[Zope-Checkins] SVN: Zope/branches/2.12/src/Products/SiteAccess/VirtualHostMonster.py Wrap long lines.

Tres Seaver tseaver at palladion.com
Thu May 20 18:41:15 EDT 2010


Log message for revision 112592:
  Wrap long lines.

Changed:
  U   Zope/branches/2.12/src/Products/SiteAccess/VirtualHostMonster.py

-=-
Modified: Zope/branches/2.12/src/Products/SiteAccess/VirtualHostMonster.py
===================================================================
--- Zope/branches/2.12/src/Products/SiteAccess/VirtualHostMonster.py	2010-05-20 22:31:19 UTC (rev 112591)
+++ Zope/branches/2.12/src/Products/SiteAccess/VirtualHostMonster.py	2010-05-20 22:41:15 UTC (rev 112592)
@@ -58,8 +58,9 @@
                 try:
                     host, path = [x.strip() for x in  line.split('/', 1)]
                 except:
-                    raise ValueError, (
-                        'Line needs a slash between host and path: %s' % line )
+                    raise ValueError(
+                        'Line needs a slash between host and path: %s'
+                            % line )
                 pp = filter(None, path.split( '/'))
                 if pp:
                     obpath = pp[:]
@@ -105,7 +106,8 @@
         self.lines = tuple(new_lines)
         self.have_map = not not (fixed_map or sub_map) # booleanize
         if RESPONSE is not None:
-            RESPONSE.redirect('manage_edit?manage_tabs_message=Changes%20Saved.')
+            RESPONSE.redirect(
+                'manage_edit?manage_tabs_message=Changes%20Saved.')
 
     def addToContainer(self, container):
         container._setObject(self.id, self)
@@ -195,15 +197,17 @@
                         vh_part = path.pop(0)[1:]
                     if vh_part:
                         request['VIRTUAL_URL_PARTS'] = vup = (
-                            request['SERVER_URL'], vh_part, quote('/'.join(path)))
+                            request['SERVER_URL'],
+                            vh_part, quote('/'.join(path)))
                     else:
                         request['VIRTUAL_URL_PARTS'] = vup = (
                             request['SERVER_URL'], quote('/'.join(path)))
                     request['VIRTUAL_URL'] = '/'.join(vup)
 
                     # new ACTUAL_URL
-                    add = (path and request['ACTUAL_URL'].endswith('/')) and '/' or ''
-                    request['ACTUAL_URL'] = request['VIRTUAL_URL']+add
+                    add = (path and
+                           request['ACTUAL_URL'].endswith('/')) and '/' or ''
+                    request['ACTUAL_URL'] = request['VIRTUAL_URL'] + add
 
                 return
             vh_used = 1 # Only retry once.



More information about the Zope-Checkins mailing list