[Zope-CVS] CVS: Packages/zpkgtools/zpkgtools - app.py:1.38

Fred L. Drake, Jr. fred at zope.com
Tue Apr 27 17:04:44 EDT 2004


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

Modified Files:
	app.py 
Log Message:
cause zpkg to report an error when multiple resources share the same name;
this previously generated a mysterious traceback when os.mkdir() failed


=== Packages/zpkgtools/zpkgtools/app.py 1.37 => 1.38 ===
--- Packages/zpkgtools/zpkgtools/app.py:1.37	Tue Apr 27 11:13:52 2004
+++ Packages/zpkgtools/zpkgtools/app.py	Tue Apr 27 17:04:13 2004
@@ -168,6 +168,7 @@
                                        packages, collections)
 
     def assemble_collection(self):
+        self.name_parts = sets.Set()
         # Build the destination directory:
         deps = self.add_component("collection",
                                   self.resource_name,
@@ -241,6 +242,11 @@
           Directory containing the source of the component.
 
         """
+        if name in self.name_parts:
+            self.error("resources of different types share the name %r;"
+                       " could not create component directories for each"
+                       % name)
+        self.name_parts.add(name)
         destination = os.path.join(self.destination, name)
         self.ip.add_manifest(destination)
         specs = include.load(source)
@@ -560,8 +566,8 @@
     identifier of the resource to be packaged.
 
     :return: Options object containing values derived from the command
-      line, the name of the application, and the name of the resource
-      to operate on.
+      line, including the name of the application and the name of the
+      resource to operate on.
 
     :param argv: The command line arguments, including argv[0].
 




More information about the Zope-CVS mailing list