[Zope-CVS] CVS: Products/Basket - basket.py:1.4

Chris McDonough chrism at plope.com
Thu Nov 10 17:51:19 EST 2005


Update of /cvs-repository/Products/Basket
In directory cvs.zope.org:/tmp/cvs-serv27444

Modified Files:
	basket.py 
Log Message:
Fix some tests that break if you happen to have non-fixture eggs on your path.

Don't blast out a tempdir-based egg if the egg is already a directory.


=== Products/Basket/basket.py 1.3 => 1.4 ===
--- Products/Basket/basket.py:1.3	Thu Nov 10 14:37:14 2005
+++ Products/Basket/basket.py	Thu Nov 10 17:50:49 2005
@@ -124,9 +124,13 @@
             if is_zip_safe_distribution(distribution):
                 working_set.add(distribution)
             else:
-                # if it's not zip-safe, blast it out to a tempdir and create
-                # new distro out of the file-based egg; we delete the
-                # tempdir at system exit
+                if os.path.isdir(distribution.location):
+                    # already a directory
+                    working_set.add(distribution)
+                    continue
+                # if it's not zip-safe and not already a directory, blast
+                # it out to a tempdir and create new distro out of the
+                # file-based egg; we delete the tempdir at system exit
                 if by_require: # these get added to the working set in req mode
                     remove_distribution_from_working_set(distribution)
                 tempdir = tempfile.mkdtemp()
@@ -193,4 +197,5 @@
     working_set.entries.remove(distribution.location)
     del working_set.by_key[distribution.key]
     working_set.entry_keys[distribution.location] = []
+    self.old_callbacks = self.working_set.callbacks[:]
     sys.path.remove(distribution.location)



More information about the Zope-CVS mailing list