]> TLD Linux GIT Repositories - tld-builder.git/blobdiff - TLD_Builder/rpm_builder.py
- more python3 fixes, dropped python2 support
[tld-builder.git] / TLD_Builder / rpm_builder.py
index 239f5a38b67b5b0c6f654d7b50a31e7d8e5a399b..e33a7e1ff325a55557ec5607b479d022c8d61a73 100644 (file)
@@ -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)