Merge branch 'submittodebian_context_mgr' of git+ssh://git.launchpad.net/~ddstreet/ubuntu-dev-tools/+git/ubuntu-dev-tools

MR: https://code.launchpad.net/~ddstreet/ubuntu-dev-tools/+git/ubuntu-dev-tools/+merge/375291
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
Mattia Rizzolo 2019-11-11 14:27:20 +01:00
commit 8220accbe8
No known key found for this signature in database
GPG Key ID: 0816B9E18C762BAD
2 changed files with 3 additions and 3 deletions

1
debian/changelog vendored
View File

@ -6,6 +6,7 @@ ubuntu-dev-tools (0.175) UNRELEASED; urgency=medium
[ Dan Streetman ]
* tests/pylint.conf: use jobs=0 to speed up tests.
* submittodebian: use a context manager while opening a file.
-- Mattia Rizzolo <mattia@debian.org> Mon, 28 Oct 2019 14:32:20 +0100

View File

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