]> TLD Linux GIT Repositories - tld-builder.git/commitdiff
- more pythin 3.x fixes
authorMarcin Krol <hawk@tld-linux.org>
Mon, 22 Mar 2021 20:00:43 +0000 (21:00 +0100)
committerMarcin Krol <hawk@tld-linux.org>
Mon, 22 Mar 2021 20:00:43 +0000 (21:00 +0100)
TLD_Builder/file_sender.py
TLD_Builder/load_balancer.py
TLD_Builder/rpm_builder.py
TLD_Builder/srpm_builder.py

index 737dfcb9252bf322de23cf7253d67f1bf5e02c23..2a0c1200e0c8fbf93df1b2962fc696dc29041043 100644 (file)
@@ -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
index 019c1844fb786c69e8cb94e45a9a366149ffdea4..9560ed68d48054ef66af604a2e5670015e529dd9 100644 (file)
@@ -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)
index f9f4ddaadeda38f5de59d8f65d56c9c2cccd06c2..80677d52de68a0146c26e04745b4ba95ed46a47e 100644 (file)
@@ -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
 
index 9e45e55e30614d8a35d190a87c3a3dfda27cc875..6b8ea545e90acd714dae3614b3ecd24d53d51b45 100644 (file)
@@ -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