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
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
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)
b.log_line("copy rpm files to cache_dir: %s" % rpm_cache_dir)
chroot.run(
"cp -f %s %s && poldek --mo=nodiff --mkidxz -s %s/" % \
- (string.join(b.files), rpm_cache_dir, rpm_cache_dir),
+ (' '.join(b.files), rpm_cache_dir, rpm_cache_dir),
logfile = b.logfile, user = "root"
)
else: