mild cleanup
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 28 Dec 2007 15:39:31 +0000 (15:39 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 28 Dec 2007 15:39:31 +0000 (15:39 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/acq-experiment@8284 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/oilsweb/oilsweb/lib/context.py

index 38d4610..0eceea4 100644 (file)
@@ -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,10 +53,7 @@ class Context(object):
                         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
+        return q[:-1] # strip the trailing &
 
     def apply_cookies(self):
         for f in self._fields: