Skip to content

Commit a7432f7

Browse files
author
Richard Jones
committed
Some cleanup.
1 parent df33824 commit a7432f7

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

roundup/cgi_client.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1616
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1717
#
18-
# $Id: cgi_client.py,v 1.39 2001-10-23 01:00:18 richard Exp $
18+
# $Id: cgi_client.py,v 1.40 2001-10-23 23:06:39 richard Exp $
1919

2020
import os, cgi, pprint, StringIO, urlparse, re, traceback, mimetypes
2121
import base64, Cookie, time
@@ -644,7 +644,7 @@ def main(self, dre=re.compile(r'([^\d]+)(\d+)'),
644644
# now figure which function to call
645645
path = self.split_path
646646
if not path or path[0] in ('', 'index'):
647-
self.index()
647+
return self.index()
648648
elif not path:
649649
raise 'ValueError', 'Path not understood'
650650

@@ -656,30 +656,25 @@ def main(self, dre=re.compile(r'([^\d]+)(\d+)'),
656656
# is correct, but doesn't actually use it.
657657
action = path[0]
658658
if action == 'login_action':
659-
self.login_action()
660-
return
659+
return self.login_action()
661660

662661
# make sure anonymous are allowed to register
663662
if self.ANONYMOUS_REGISTER == 'deny' and self.user is None:
664663
return self.login()
665664

666665
if action == 'newuser_action':
667-
self.newuser_action()
668-
return
666+
return self.newuser_action()
669667

670668
# make sure totally anonymous access is OK
671669
if self.ANONYMOUS_ACCESS == 'deny' and self.user is None:
672670
return self.login()
673671

674672
if action == 'list_classes':
675-
self.classes()
676-
return
673+
return self.classes()
677674
if action == 'login':
678-
self.login()
679-
return
675+
return self.login()
680676
if action == 'logout':
681-
self.logout()
682-
return
677+
return self.logout()
683678
m = dre.match(action)
684679
if m:
685680
self.classname = m.group(1)
@@ -696,17 +691,15 @@ def main(self, dre=re.compile(r'([^\d]+)(\d+)'),
696691
func = getattr(self, 'show%s'%self.classname)
697692
except AttributeError:
698693
raise NotFound
699-
func()
700-
return
694+
return func()
701695
m = nre.match(action)
702696
if m:
703697
self.classname = m.group(1)
704698
try:
705699
func = getattr(self, 'new%s'%self.classname)
706700
except AttributeError:
707701
raise NotFound
708-
func()
709-
return
702+
return func()
710703
self.classname = action
711704
try:
712705
self.db.getclass(self.classname)
@@ -852,6 +845,13 @@ def parsePropsFromForm(db, cl, form, nodeid=0):
852845

853846
#
854847
# $Log: not supported by cvs2svn $
848+
# Revision 1.39 2001/10/23 01:00:18 richard
849+
# Re-enabled login and registration access after lopping them off via
850+
# disabling access for anonymous users.
851+
# Major re-org of the htmltemplate code, cleaning it up significantly. Fixed
852+
# a couple of bugs while I was there. Probably introduced a couple, but
853+
# things seem to work OK at the moment.
854+
#
855855
# Revision 1.38 2001/10/22 03:25:01 richard
856856
# Added configuration for:
857857
# . anonymous user access and registration (deny/allow)

0 commit comments

Comments
 (0)