[open-ils-commits] r8284 - branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Dec 28 11:02:23 EST 2007


Author: erickson
Date: 2007-12-28 10:39:31 -0500 (Fri, 28 Dec 2007)
New Revision: 8284

Modified:
   branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/context.py
Log:
mild cleanup

Modified: branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/context.py
===================================================================
--- branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/context.py	2007-12-28 15:38:51 UTC (rev 8283)
+++ branches/acq-experiment/Open-ILS/web/oilsweb/oilsweb/lib/context.py	2007-12-28 15:39:31 UTC (rev 8284)
@@ -1,7 +1,9 @@
 from oilsweb.lib.util import childInit
 import cgi
 
+# global context
 _context = None
+# global collection of sub-contexts
 _subContexts = {}
 
 class ContextItem(object):
@@ -51,11 +53,8 @@
                         if isinstance(val, str) or isinstance(val, unicode):
                             q += f.cgi_name+'='+cgi.escape(val)+'&'
 
-        if len(q) > 0: 
-            q = q[:-1] # strip the trailing &
+        return q[:-1] # strip the trailing &
 
-        return q
-
     def apply_cookies(self):
         for f in self._fields:
             if f.cgi_name and f.cookie:



More information about the open-ils-commits mailing list