[vlc-commits] Remove sorting workaround for Python < (2.4)!

cclauss git at videolan.org
Fri Jul 13 12:00:51 CEST 2018


vlc/python | branch: master | cclauss <cclauss at bluewin.ch> | Tue Jul 10 16:48:52 2018 +0200| [4fe16291979db25bf4caafb943b9539df164cfc3] | committer: GitHub

Remove sorting workaround for Python < (2.4)!

> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=4fe16291979db25bf4caafb943b9539df164cfc3
---

 distribute_setup.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/distribute_setup.py b/distribute_setup.py
index 3553b21..776a941 100644
--- a/distribute_setup.py
+++ b/distribute_setup.py
@@ -495,13 +495,7 @@ def _extractall(self, path=".", members=None):
         self.extract(tarinfo, path)
 
     # Reverse sort directories.
-    if sys.version_info < (2, 4):
-        def sorter(dir1, dir2):
-            return cmp(dir1.name, dir2.name)
-        directories.sort(sorter)
-        directories.reverse()
-    else:
-        directories.sort(key=operator.attrgetter('name'), reverse=True)
+    directories.sort(key=operator.attrgetter('name'), reverse=True)
 
     # Set correct owner, mtime and filemode on directories.
     for tarinfo in directories:



More information about the vlc-commits mailing list