diff options
author | marmeladema <xademax@gmail.com> | 2019-10-28 23:51:10 +0000 |
---|---|---|
committer | marmeladema <xademax@gmail.com> | 2019-12-09 19:31:46 +0000 |
commit | 3f48f2863cf21e3584c908d653e15521aae3ed5c (patch) | |
tree | b7987413ad479589cf2c74733d0e3dade1bd109d /python/servo/command_base.py | |
parent | 67c2c115c00e0073e2e13d29becf14363ed6f6b9 (diff) | |
download | servo-3f48f2863cf21e3584c908d653e15521aae3ed5c.tar.gz servo-3f48f2863cf21e3584c908d653e15521aae3ed5c.zip |
Convert cmp= to key= in sort method call for Python3 compatibility
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r-- | python/servo/command_base.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 7473b78844d..7184010442c 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -27,6 +27,7 @@ import six import sys import tarfile import zipfile +import functools from xml.etree.ElementTree import XML from servo.util import download_file import six.moves.urllib as urllib @@ -103,7 +104,7 @@ def archive_deterministically(dir_to_archive, dest_archive, prepend_path=None): # Sort file entries with the fixed locale with setlocale('C'): - file_list.sort(cmp=locale.strcoll) + file_list.sort(key=functools.cmp_to_key(locale.strcoll)) # Use a temporary file and atomic rename to avoid partially-formed # packaging (in case of exceptional situations like running out of disk space). |