Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 5073:d0aa596daca8
Remove 'import *' statement from cgi/client.py
There are various 'import *' statements scattered through the code which
are generally not a good thing. These should be fairly safe changes, but
I'll commit them one file at a time to make it easier to track down
issues with a bisect if they crop up later.
| author | John Kristensen <john@jerrykan.com> |
|---|---|
| date | Fri, 10 Jun 2016 17:19:51 +1000 |
| parents | dce3cfe7ec61 |
| children | 65fef7858606 |
comparison
equal
deleted
inserted
replaced
| 5072:1c792cf0a574 | 5073:d0aa596daca8 |
|---|---|
| 13 except ImportError: | 13 except ImportError: |
| 14 SysCallError = None | 14 SysCallError = None |
| 15 | 15 |
| 16 from roundup import roundupdb, date, hyperdb, password | 16 from roundup import roundupdb, date, hyperdb, password |
| 17 from roundup.cgi import templating, cgitb, TranslationService | 17 from roundup.cgi import templating, cgitb, TranslationService |
| 18 from roundup.cgi.actions import * | 18 from roundup.cgi import actions |
| 19 from roundup.exceptions import LoginError, Reject, RejectRaw, Unauthorised | 19 from roundup.exceptions import LoginError, Reject, RejectRaw, Unauthorised |
| 20 from roundup.cgi.exceptions import * | 20 from roundup.cgi.exceptions import ( |
| 21 FormError, NotFound, NotModified, Redirect, SendFile, SendStaticFile, | |
| 22 SeriousError) | |
| 21 from roundup.cgi.form_parser import FormParser | 23 from roundup.cgi.form_parser import FormParser |
| 22 from roundup.mailer import Mailer, MessageSendError, encode_quopri | 24 from roundup.mailer import Mailer, MessageSendError, encode_quopri |
| 23 from roundup.cgi import accept_language | 25 from roundup.cgi import accept_language |
| 24 from roundup import xmlrpc | 26 from roundup import xmlrpc |
| 25 | 27 |
| 1220 # than the one we tried to generate above. | 1222 # than the one we tried to generate above. |
| 1221 raise exc_info[0], exc_info[1], exc_info[2] | 1223 raise exc_info[0], exc_info[1], exc_info[2] |
| 1222 | 1224 |
| 1223 # these are the actions that are available | 1225 # these are the actions that are available |
| 1224 actions = ( | 1226 actions = ( |
| 1225 ('edit', EditItemAction), | 1227 ('edit', actions.EditItemAction), |
| 1226 ('editcsv', EditCSVAction), | 1228 ('editcsv', actions.EditCSVAction), |
| 1227 ('new', NewItemAction), | 1229 ('new', actions.NewItemAction), |
| 1228 ('register', RegisterAction), | 1230 ('register', actions.RegisterAction), |
| 1229 ('confrego', ConfRegoAction), | 1231 ('confrego', actions.ConfRegoAction), |
| 1230 ('passrst', PassResetAction), | 1232 ('passrst', actions.PassResetAction), |
| 1231 ('login', LoginAction), | 1233 ('login', actions.LoginAction), |
| 1232 ('logout', LogoutAction), | 1234 ('logout', actions.LogoutAction), |
| 1233 ('search', SearchAction), | 1235 ('search', actions.SearchAction), |
| 1234 ('retire', RetireAction), | 1236 ('retire', actions.RetireAction), |
| 1235 ('show', ShowAction), | 1237 ('show', actions.ShowAction), |
| 1236 ('export_csv', ExportCSVAction), | 1238 ('export_csv', actions.ExportCSVAction), |
| 1237 ) | 1239 ) |
| 1238 def handle_action(self): | 1240 def handle_action(self): |
| 1239 """ Determine whether there should be an Action called. | 1241 """ Determine whether there should be an Action called. |
| 1240 | 1242 |
| 1241 The action is defined by the form variable :action which | 1243 The action is defined by the form variable :action which |
