mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-06-06 21:41:28 +00:00
Don't use with statement in update_maintainer (breaks with StringIO). Fix regression in detecting Debian-targetted uploads
This commit is contained in:
parent
cd236932de
commit
2f17d27ca7
@ -82,9 +82,9 @@ class Control(object):
|
||||
|
||||
def _get_distribution(changelog_file):
|
||||
"""get distribution of latest changelog entry"""
|
||||
with open(changelog_file) as f:
|
||||
changelog = debian.changelog.Changelog(f, strict=False, max_blocks=1)
|
||||
distribution = changelog.distributions[0]
|
||||
changelog = debian.changelog.Changelog(open(changelog_file), strict=False,
|
||||
max_blocks=1)
|
||||
distribution = changelog.distributions.split()[0]
|
||||
# Strip things like "-proposed-updates" or "-security" from distribution
|
||||
return distribution.split("-", 1)[0]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user