[Zope-Checkins] CVS: Zope/lib/python/OFS - ObjectManager.py:1.168

Fred L. Drake, Jr. fred at zope.com
Mon Dec 15 20:38:19 EST 2003


Update of /cvs-repository/Zope/lib/python/OFS
In directory cvs.zope.org:/tmp/cvs-serv21802

Modified Files:
	ObjectManager.py 
Log Message:
- simplify code that sorts the results list for FTP LIST
- only sort the results once


=== Zope/lib/python/OFS/ObjectManager.py 1.167 => 1.168 ===
--- Zope/lib/python/OFS/ObjectManager.py:1.167	Mon Dec 15 17:09:25 2003
+++ Zope/lib/python/OFS/ObjectManager.py	Mon Dec 15 20:38:18 2003
@@ -598,11 +598,7 @@
 
             files = all_files
 
-        try:
-            files.sort()
-        except AttributeError:
-            files=list(files)
-            files.sort()
+        files = list(files)
 
         # Perform globbing on list of files (ajung)
 
@@ -610,11 +606,7 @@
         if globbing :
             files = filter(lambda x,g=globbing: fnmatch.fnmatch(x[0],g), files)
 
-        try:
-            files.sort()
-        except AttributeError:
-            files=list(files)
-            files.sort()
+        files.sort()
 
         if not (hasattr(self,'isTopLevelPrincipiaApplicationObject') and
                 self.isTopLevelPrincipiaApplicationObject):




More information about the Zope-Checkins mailing list