[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - include.py:1.16

Fred L. Drake, Jr. fred at zope.com
Thu Apr 1 11:42:24 EST 2004


Update of /cvs-repository/Packages/zpkgtools/zpkgtools
In directory cvs.zope.org:/tmp/cvs-serv3399/zpkgtools

Modified Files:
	include.py 
Log Message:
the path normalization methods are really local utilities; rename them to use
names_with_underscores for readability


=== Packages/zpkgtools/zpkgtools/include.py 1.15 => 1.16 ===
--- Packages/zpkgtools/zpkgtools/include.py:1.15	Wed Mar 31 15:42:22 2004
+++ Packages/zpkgtools/zpkgtools/include.py	Thu Apr  1 11:41:53 2004
@@ -89,8 +89,8 @@
                     " both target and source parts",
                     filename, lineno)
             dest, src = parts
-            dest = self.normalizePath(dest, "destination", filename, lineno)
-            src = self.normalizePathOrURL(src, "source", filename, lineno)
+            dest = self.normalize_path(dest, "destination", filename, lineno)
+            src = self.normalize_path_or_url(src, "source", filename, lineno)
             if src == "-":
                 path = os.path.join(self.source, dest)
                 expansions = filter_names(glob.glob(path))
@@ -103,7 +103,7 @@
             else:
                 self.includes[dest] = src
 
-    def normalizePath(self, path, type, filename, lineno):
+    def normalize_path(self, path, type, filename, lineno):
         if ":" in path:
             scheme, rest = urllib.splittype(path)
             if len(scheme) == 1:
@@ -122,13 +122,13 @@
                 filename, lineno)
         return np.replace("/", os.sep)
 
-    def normalizePathOrURL(self, path, type, filename, lineno):
+    def normalize_path_or_url(self, path, type, filename, lineno):
         if ":" in path:
             scheme, rest = urllib.splittype(path)
             if len(scheme) != 1:
                 # should normalize the URL, but skip that for now
                 return path
-        return self.normalizePath(path, type, filename, lineno)
+        return self.normalize_path(path, type, filename, lineno)
 
 
 class InclusionProcessor:




More information about the Zope-CVS mailing list