[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - cvsloader.py:1.6

Fred L. Drake, Jr. fred at zope.com
Wed Mar 10 13:57:49 EST 2004


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

Modified Files:
	cvsloader.py 
Log Message:
when a FileProxy is created from a URL, use the URL as the .name attribute


=== Packages/zpkgtools/zpkgtools/cvsloader.py 1.5 => 1.6 ===
--- Packages/zpkgtools/zpkgtools/cvsloader.py:1.5	Wed Mar 10 13:17:08 2004
+++ Packages/zpkgtools/zpkgtools/cvsloader.py	Wed Mar 10 13:57:18 2004
@@ -192,7 +192,7 @@
     loader = CvsLoader(None)
     path = loader.load(url)
     if os.path.isfile(path):
-        return FileProxy(path, mode)
+        return FileProxy(path, mode, loader, url)
     # Only files and directories come from CVS, so no need to check
     # for magical directory entries here:
     loader.cleanup()
@@ -318,8 +318,8 @@
 
 class FileProxy(object):
 
-    def __init__(self, path, mode, loader):
-        self.name = path
+    def __init__(self, path, mode, loader, url=None):
+        self.name = url or path
         self._file = file(path, mode)
         self._cleanup = loader.cleanup
 




More information about the Zope-CVS mailing list