summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2015-01-25 21:49:03 +0100
committerOlav Vitters <olav@vitters.nl>2015-01-25 21:49:03 +0100
commit218f5c5a2fb3da6978fdbcd3ef07fa5dcdb9539c (patch)
tree5d48b59fbb88b31fb0dd44ae5c3a0c7b2e5328fa
parent67f48b8dd0fad827fa37f7850fed92750ef25b5e (diff)
downloadmgagnome-218f5c5a2fb3da6978fdbcd3ef07fa5dcdb9539c.tar
mgagnome-218f5c5a2fb3da6978fdbcd3ef07fa5dcdb9539c.tar.gz
mgagnome-218f5c5a2fb3da6978fdbcd3ef07fa5dcdb9539c.tar.bz2
mgagnome-218f5c5a2fb3da6978fdbcd3ef07fa5dcdb9539c.tar.xz
mgagnome-218f5c5a2fb3da6978fdbcd3ef07fa5dcdb9539c.zip
more python3 fixes
-rwxr-xr-xmgagnome8
1 files changed, 4 insertions, 4 deletions
diff --git a/mgagnome b/mgagnome
index dfc86b9..16a505e 100755
--- a/mgagnome
+++ b/mgagnome
@@ -319,7 +319,7 @@ if not hasattr(tarfile.TarFile, 'xzopen'):
tarfile.open = XzTarFile.open
def is_valid_hash(path, algo, hexdigest):
- if algo not in hashlib.algorithms:
+ if algo not in hashlib.algorithms_available:
raise ValueError("Unknown hash algorithm: %s" % algo)
local_hash = getattr(hashlib, algo)()
@@ -1015,7 +1015,7 @@ class Downstream(object):
DISTRO=None
def __init__(self):
- contents = subprocess.check_output(['urpmf', '--qf', '%name|%version|%files', '.', "--media", self.MEDIA], close_fds=True).strip("\n").splitlines()
+ contents = subprocess.check_output(['urpmf', '--qf', '%name|%version|%files', '.', "--media", self.MEDIA], close_fds=True).decode("utf-8").strip("\n").splitlines()
FILES = {}
TARBALLS = {}
@@ -1023,7 +1023,7 @@ class Downstream(object):
for line in contents:
try:
- srpm, version, filename = line.decode("utf-8").split("|")
+ srpm, version, filename = line.split("|")
except ValueError:
print(line, file=sys.stderr)
continue
@@ -1575,7 +1575,7 @@ def cmd_parse_ftp_release_list(options, parser):
p.wait()
- msg = email.email.message_from_file(sys.stdin)
+ msg = email.message_from_file(sys.stdin)
if options.mail:
stdout = tempfile.TemporaryFile()