From efb29ebd19be1db746873c582469d897b76f50ef Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Mon, 22 Mar 2021 21:00:43 +0100 Subject: [PATCH] - more pythin 3.x fixes --- TLD_Builder/file_sender.py | 2 +- TLD_Builder/load_balancer.py | 2 +- TLD_Builder/rpm_builder.py | 2 +- TLD_Builder/srpm_builder.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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 -- 2.46.0