[cig-commits] commit: python 2.3 compatibility fix
Mercurial
hg at geodynamics.org
Mon Nov 24 11:26:46 PST 2008
changeset: 3:f51a766973c4
user: James Bostock <james.bostock at gmail.com>
date: Fri Jul 21 10:10:35 2006 +0100
files: forest.py
description:
python 2.3 compatibility fix
Python 2.3 does not support the reverse keyword argument to the list
sort method.
diff -r 2fb8977ed545 -r f51a766973c4 forest.py
--- a/forest.py Wed Jul 19 11:24:51 2006 +0200
+++ b/forest.py Fri Jul 21 10:10:35 2006 +0100
@@ -59,7 +59,8 @@ def enumerate_repos(top=''):
while dirs:
root = dirs.pop()
entries = os.listdir(os.path.join(top, root))
- entries.sort(reverse=True)
+ entries.sort()
+ entries.reverse()
for e in entries:
path = os.path.join(root, e)
if not os.path.isdir(os.path.join(top, path)):
More information about the CIG-COMMITS
mailing list