From ed0cd2c1b54162e7fec494081e6a9f5c8506bd0e Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Thu, 18 Dec 2014 22:05:55 +0000 Subject: [PATCH] file is gone in python3 --- ubuntutools/sponsor_patch/source_package.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubuntutools/sponsor_patch/source_package.py b/ubuntutools/sponsor_patch/source_package.py index 69910ec..b9fa2a0 100644 --- a/ubuntutools/sponsor_patch/source_package.py +++ b/ubuntutools/sponsor_patch/source_package.py @@ -351,7 +351,7 @@ class SourcePackage(object): assert os.path.isfile(self._changes_file), "%s does not exist." % \ (self._changes_file) - changes = debian.deb822.Changes(file(self._changes_file)) + changes = debian.deb822.Changes(open(self._changes_file)) fixed_bugs = [] if "Launchpad-Bugs-Fixed" in changes: fixed_bugs = changes["Launchpad-Bugs-Fixed"].split(" ") @@ -393,7 +393,7 @@ class SourcePackage(object): # Check the changelog self._changelog = debian.changelog.Changelog() try: - self._changelog.parse_changelog(file("debian/changelog"), + self._changelog.parse_changelog(open("debian/changelog"), max_blocks=1, strict=True) except debian.changelog.ChangelogParseError as error: Logger.error("The changelog entry doesn't validate: %s", str(error))