Merge branch 'fix-sponsor-patch' of git+ssh://git.launchpad.net/~logan/ubuntu-dev-tools

MR: https://code.launchpad.net/~logan/ubuntu-dev-tools/+git/ubuntu-dev-tools/+merge/398509
Signed-off-by: Mattia Rizzolo <mattia@debian.org>
This commit is contained in:
Mattia Rizzolo 2021-02-24 14:24:50 +01:00
commit 09537bd44d
No known key found for this signature in database
GPG Key ID: 0816B9E18C762BAD
4 changed files with 6 additions and 3 deletions

3
debian/changelog vendored
View File

@ -2,6 +2,9 @@ ubuntu-dev-tools (0.181) UNRELEASED; urgency=medium
* WIP.
[ Logan Rosen ]
* fix a couple of remaining issues from the py2→py3 move.
-- Mattia Rizzolo <mattia@debian.org> Wed, 24 Feb 2021 14:23:29 +0100
ubuntu-dev-tools (0.180) unstable; urgency=medium

View File

@ -82,7 +82,7 @@ def input_number(question, min_number, max_number, default=None):
else:
question += "? "
selected = None
while selected < min_number or selected > max_number:
while not selected or selected < min_number or selected > max_number:
try:
selected = input(question).strip()
except (EOFError, KeyboardInterrupt):

View File

@ -74,7 +74,7 @@ class BugTask(object):
if url.endswith(".dsc"):
response, data = httplib2.Http().request(url)
assert response.status == 200
with open(filename, 'w') as f:
with open(filename, 'wb') as f:
f.write(data)
dsc_file = os.path.join(os.getcwd(), filename)

View File

@ -68,7 +68,7 @@ class Patch(object):
def download(self):
"""Downloads the patch from Launchpad."""
Logger.debug("Downloading %s." % (self._patch_file))
patch_f = open(self._patch_file, "w")
patch_f = open(self._patch_file, "wb")
patch_f.write(self._patch.data.open().read())
patch_f.close()