WebBrowser/SafeBrowsing/SafeBrowsingUrl.py

branch
safe_browsing
changeset 5811
5358a3c7995f
parent 5809
5b53c17b7d93
child 5817
a5f6c9128500
--- a/WebBrowser/SafeBrowsing/SafeBrowsingUrl.py	Mon Jul 17 19:58:37 2017 +0200
+++ b/WebBrowser/SafeBrowsing/SafeBrowsingUrl.py	Tue Jul 18 19:33:46 2017 +0200
@@ -158,11 +158,11 @@
                 yield host
                 return
             parts = host.split('.')
-            l = min(len(parts), 5)
-            if l > 4:
+            partsLen = min(len(parts), 5)
+            if partsLen > 4:
                 yield host
-            for i in range(l - 1):
-                yield '.'.join(parts[i - l:])
+            for i in range(partsLen - 1):
+                yield '.'.join(parts[i - partsLen:])
         
         def pathPermutations(path):
             """
@@ -176,7 +176,7 @@
             yield path
             query = None
             if '?' in path:
-                path, query =  path.split('?', 1)
+                path, query = path.split('?', 1)
             if query is not None:
                 yield path
             pathParts = path.split('/')[0:-1]

eric ide

mercurial