From: Marcin Krol Date: Mon, 22 Mar 2021 20:00:43 +0000 (+0100) Subject: - more pythin 3.x fixes X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=efb29ebd19be1db746873c582469d897b76f50ef;p=tld-builder.git - more pythin 3.x fixes --- diff --git a/TLD_Builder/file_sender.py b/TLD_Builder/file_sender.py index 737dfcb..2a0c120 100644 --- a/TLD_Builder/file_sender.py +++ b/TLD_Builder/file_sender.py @@ -168,7 +168,7 @@ def flush_queue(dir): return cmp(x['Type'], y['Type']) else: return rc - q.sort(mycmp) + q.sort(key=mycmp) error = None # copy of q diff --git a/TLD_Builder/load_balancer.py b/TLD_Builder/load_balancer.py index 019c184..9560ed6 100644 --- a/TLD_Builder/load_balancer.py +++ b/TLD_Builder/load_balancer.py @@ -40,7 +40,7 @@ def builders_order(): def mycmp(b1, b2): return cmp(bs[b1], bs[b2]) - bl.sort(mycmp) + bl.sort(key=mycmp) f.seek(0) f.truncate(0) diff --git a/TLD_Builder/rpm_builder.py b/TLD_Builder/rpm_builder.py index f9f4dda..80677d5 100644 --- a/TLD_Builder/rpm_builder.py +++ b/TLD_Builder/rpm_builder.py @@ -51,7 +51,7 @@ def pick_request(q): return cmp(r1.time, r2.time) else: return pri_diff - q.requests.sort(mycmp) + q.requests.sort(key=mycmp) ret = q.requests[0] return ret diff --git a/TLD_Builder/srpm_builder.py b/TLD_Builder/srpm_builder.py index 9e45e55..6b8ea54 100644 --- a/TLD_Builder/srpm_builder.py +++ b/TLD_Builder/srpm_builder.py @@ -42,7 +42,7 @@ def pick_request(q): return cmp(r1.time, r2.time) else: return pri_diff - q.requests.sort(mycmp) + q.requests.sort(key=mycmp) ret = q.requests[0] q.requests = q.requests[1:] return ret