X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=TLD_Builder%2Frpm_builder.py;h=e33a7e1ff325a55557ec5607b479d022c8d61a73;hb=9ea122b00e3a99b16246e1e38576916a2e25c0aa;hp=f9f4ddaadeda38f5de59d8f65d56c9c2cccd06c2;hpb=c4d0706eae2dd9530000a8ad8b62188c417c2caa;p=tld-builder.git diff --git a/TLD_Builder/rpm_builder.py b/TLD_Builder/rpm_builder.py index f9f4dda..e33a7e1 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=util.cmp_to_key(mycmp)) ret = q.requests[0] return ret @@ -85,7 +85,7 @@ def check_skip_build(r, b): return False def fetch_src(r, b): - src_url = config.control_url + "/srpms/" + r.id + "/" + urllib.quote(b.src_rpm) + src_url = config.control_url + "/srpms/" + r.id + "/" + urllib.parse.quote(b.src_rpm) b.log_line("fetching %s" % src_url) start = time.time() good = False @@ -126,7 +126,7 @@ def fetch_src(r, b): print("error.reason exception %s" % e) raise - o = chroot.popen("cat > %s" % b.src_rpm, mode = "w") + o = chroot.popen("cat > %s" % b.src_rpm, mode = "wb") try: bytes = util.sendfile(f, o)