[Zope3-checkins] CVS: Zope3/src/zope/fssync/tests - mockmetadata.py:1.2

Guido van Rossum guido@python.org
Wed, 28 May 2003 14:08:11 -0400


Update of /cvs-repository/Zope3/src/zope/fssync/tests
In directory cvs.zope.org:/tmp/cvs-serv1024

Modified Files:
	mockmetadata.py 
Log Message:
getnames() should only return names whose entry is non-empty.


=== Zope3/src/zope/fssync/tests/mockmetadata.py 1.1 => 1.2 ===
--- Zope3/src/zope/fssync/tests/mockmetadata.py:1.1	Wed May 28 09:48:16 2003
+++ Zope3/src/zope/fssync/tests/mockmetadata.py	Wed May 28 14:08:10 2003
@@ -32,10 +32,11 @@
     def getnames(self, dirpath):
         dirkey, dirpath = self.makekey(dirpath)
         names = []
-        for key in self.database:
-            head, tail = os.path.split(key)
-            if head == dirkey:
-                names.append(tail)
+        for key, entry in self.database.iteritems():
+            if entry:
+                head, tail = os.path.split(key)
+                if head == dirkey:
+                    names.append(tail)
         return names
 
     def flush(self):