summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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()