submittodebian: use file context manager

This commit is contained in:
Dan Streetman 2019-02-06 09:51:47 -05:00
parent 982ebe6a46
commit 17cce2602c

View File

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