[Mpuls-commits] r1433 - in wasko/branches/2.0: . mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Feb 9 20:03:25 CET 2010
Author: bh
Date: 2010-02-09 20:03:23 +0100 (Tue, 09 Feb 2010)
New Revision: 1433
Modified:
wasko/branches/2.0/ChangeLog
wasko/branches/2.0/mpulsweb/lib/base.py
Log:
* mpulsweb/lib/base.py: Explicitly list all exported names in
__all__. This only includes names that are actually imported by
other modules now. Remove unused imports, which is possible now
because it's clear which names are used in this module and which
are actually imported elsewhere.
Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog 2010-02-09 18:26:19 UTC (rev 1432)
+++ wasko/branches/2.0/ChangeLog 2010-02-09 19:03:23 UTC (rev 1433)
@@ -1,5 +1,13 @@
2010-02-09 Bernhard Herzog <bh at intevation.de>
+ * mpulsweb/lib/base.py: Explicitly list all exported names in
+ __all__. This only includes names that are actually imported by
+ other modules now. Remove unused imports, which is possible now
+ because it's clear which names are used in this module and which
+ are actually imported elsewhere.
+
+2010-02-09 Bernhard Herzog <bh at intevation.de>
+
* mpulsweb/lib/base.py (CaseBaseController): Removed. Not used
anywhere.
Modified: wasko/branches/2.0/mpulsweb/lib/base.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/base.py 2010-02-09 18:26:19 UTC (rev 1432)
+++ wasko/branches/2.0/mpulsweb/lib/base.py 2010-02-09 19:03:23 UTC (rev 1433)
@@ -27,17 +27,17 @@
Provides the BaseController class for subclassing, and other objects
utilized by Controllers.
"""
-import sys
+
import md5
import logging
from time import time
from paste.httpexceptions import HTTPUnauthorized, HTTPNotFound
-from pylons import c, cache, config, g, request, response, session
+from pylons import c, config, g, request, response, session
from pylons.controllers import WSGIController
-from pylons.controllers.util import abort, etag_cache, redirect_to
-from pylons.i18n import _, ungettext, N_
+from pylons.controllers.util import redirect_to
+from pylons.i18n import _
from pylons.templating import render
import mpulsweb.lib.db as db
@@ -46,9 +46,16 @@
import mpulsweb.lib.helpers as h
from mpulsweb.lib.security import getDbName, userIdentity
-import waskaweb.model as model
+# These names are exported from this module largely for historical
+# reasons. Ideally the module should probably only export
+# BaseController and render which are customarily imported from this
+# module in Pylons.
+__all__ = ["_", "BaseController", "c", "g", "h", "redirect_to", "render",
+ "request", "response", "session"]
+
+
COOKIE_NOT_FOUND = ("Cookie konnte nicht gefunden werden."
" Haben Sie Cookies in Ihrem Browser aktiviert?")
IDENTITY_CHANGED = "Ihre Identitaet hat sich geaendert."
@@ -153,8 +160,3 @@
# overwrite key value pairs
leftd[key] = rightd[key]
return leftd
-
-
-# Include the '_' function in the public names
-__all__ = [__name for __name in locals().keys() if not __name.startswith('_') \
- or __name == '_']
More information about the Mpuls-commits
mailing list