summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2015-01-25 21:54:13 +0100
committerOlav Vitters <olav@vitters.nl>2015-01-25 21:54:13 +0100
commita8a1ae5b207b52732090938cff1b054b3217d073 (patch)
treeb2a063261dc1391ed2392c7db618a64a0cd40910
parent218f5c5a2fb3da6978fdbcd3ef07fa5dcdb9539c (diff)
downloadmgagnome-a8a1ae5b207b52732090938cff1b054b3217d073.tar
mgagnome-a8a1ae5b207b52732090938cff1b054b3217d073.tar.gz
mgagnome-a8a1ae5b207b52732090938cff1b054b3217d073.tar.bz2
mgagnome-a8a1ae5b207b52732090938cff1b054b3217d073.tar.xz
mgagnome-a8a1ae5b207b52732090938cff1b054b3217d073.zip
more python3 fixes
-rwxr-xr-xmgagnome4
1 files changed, 2 insertions, 2 deletions
diff --git a/mgagnome b/mgagnome
index 16a505e..4dbe61d 100755
--- a/mgagnome
+++ b/mgagnome
@@ -1546,7 +1546,7 @@ def cmd_parse_ftp_release_list(options, parser):
if error:
# XXX - ugly
contents.seek(0)
- lastline = contents.read().rstrip().splitlines()[-1]
+ lastline = contents.read().decode('utf-8').rstrip().splitlines()[-1]
# Remove things like "ERROR: " and so on from the last line
lastline = re.sub(r'^(?:[^ :]+:\s+)+', '', lastline)
# Remove things like " - " (youri output from mgarepo submit)
@@ -1569,7 +1569,7 @@ def cmd_parse_ftp_release_list(options, parser):
cmd = ['/usr/sbin/sendmail', '-oi', '--']
cmd.extend([to])
p = subprocess.Popen(cmd, stdin=subprocess.PIPE)
- p.stdin.write(msg.as_string())
+ p.stdin.write(msg.as_bytes())
p.stdin.flush()
p.stdin.close()
p.wait()