mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-06-05 13:01:33 +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,11 +82,11 @@ class Control(object):
|
|||||||
|
|
||||||
def _get_distribution(changelog_file):
|
def _get_distribution(changelog_file):
|
||||||
"""get distribution of latest changelog entry"""
|
"""get distribution of latest changelog entry"""
|
||||||
with open(changelog_file) as f:
|
changelog = debian.changelog.Changelog(open(changelog_file), strict=False,
|
||||||
changelog = debian.changelog.Changelog(f, strict=False, max_blocks=1)
|
max_blocks=1)
|
||||||
distribution = changelog.distributions[0]
|
distribution = changelog.distributions.split()[0]
|
||||||
# Strip things like "-proposed-updates" or "-security" from distribution
|
# Strip things like "-proposed-updates" or "-security" from distribution
|
||||||
return distribution.split("-", 1)[0]
|
return distribution.split("-", 1)[0]
|
||||||
|
|
||||||
def update_maintainer(debian_directory, verbose=False):
|
def update_maintainer(debian_directory, verbose=False):
|
||||||
"""updates the Maintainer field of an Ubuntu package
|
"""updates the Maintainer field of an Ubuntu package
|
||||||
|
Loading…
x
Reference in New Issue
Block a user