Skip to content

Commit 55382ed

Browse files
author
rkern
committed
ENH: Sort the basenames of the files in a directory in order to provide a consistent, repeatable ordering of files. Thanks to Brandon Craig Rhodes for the feature.
git-svn-id: https://svn.enthought.com/svn/sandbox/grin/trunk@79 b5260ef8-a2c4-4e91-82fd-f242746c304a
1 parent e16ac74 commit 55382ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ def walk(self, startpath):
742742
basenames = os.listdir(startpath)
743743
except OSError:
744744
return
745-
for basename in basenames:
745+
for basename in sorted(basenames):
746746
path = os.path.join(startpath, basename)
747747
for fn, k in self.walk(path):
748748
yield fn, k

0 commit comments

Comments
 (0)