From 3f48f2863cf21e3584c908d653e15521aae3ed5c Mon Sep 17 00:00:00 2001 From: marmeladema Date: Mon, 28 Oct 2019 23:51:10 +0000 Subject: Convert cmp= to key= in sort method call for Python3 compatibility --- python/servo/command_base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'python/servo/command_base.py') 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). -- cgit v1.2.3