Commits

Tay Ray Chuan committed 2c199b1

satchmo_utils.urlhelper: strip trailing whitespace

  • Participants
  • Parent commits 5c8f7a1

Comments (0)

Files changed (1)

File satchmo/apps/satchmo_utils/urlhelper.py

 
 def replace_urlpattern(urlpatterns, replacement):
     """Delete the old urlpattern, and add a new one.
-    
+
     parameters:
         urlpatterns: list
         replacement: an `django.conf.urls.defaults.url` object.
-    
+
     example:
-    
+
         replacement = url(r'^accounts/login/', 'my.site.login_signup', {}, name='auth_login'))
         replace_urlpattern(urlpatterns, replacement)
     """
     else:
         name = None
         regex = replacement.regex.pattern
-    
+
     while not found and ix < len(urlpatterns):
         pattern = urlpatterns[ix]
         if hasattr(pattern, 'url_patterns'):
                 del urlpatterns[ix]
                 urlpatterns.append(replacement)
                 found = True
-                    
+
         if not found:
             ix += 1
-            
+
     return found
-    
+
 def replace_urlpatterns(urlpatterns, replacelist):
     for replace in replacelist:
         replace_urlpattern(urlpatterns, replace)