submittodebian: open file in binary mode before writing utf-8 encoded bytes

LP: #1863119
This commit is contained in:
Dan Streetman 2020-02-13 17:37:04 -05:00
parent 1e1702e676
commit fe30873247

View File

@ -239,7 +239,7 @@ def main():
tmpdir = mkdtemp()
body = os.path.join(tmpdir, 'bug_body')
with open(body, 'w', encoding='utf-8') as f:
with open(body, 'wb') as f:
f.write(bug_body.encode('utf-8'))
restore_maintainer('debian')