From a8a1ae5b207b52732090938cff1b054b3217d073 Mon Sep 17 00:00:00 2001 From: Olav Vitters Date: Sun, 25 Jan 2015 21:54:13 +0100 Subject: more python3 fixes --- mgagnome | 4 ++-- 1 file 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() -- cgit v1.2.1