diff --git a/debian/changelog b/debian/changelog index 964127f..b3200f7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,8 @@ ubuntu-dev-tools (0.142) UNRELEASED; urgency=low (LP: #888736) * backportpackage: Allow unsigned backports (LP: #992739) * update-maintainer: Add a function to restore the original maintainer. + - Update sponsor-patch to use the new API resulting from this change + (LP: #1002999) * submittodebian: Revert Ubuntu Maintainer mangling, and re-build the source package before diffing. (LP: #902233) diff --git a/ubuntutools/sponsor_patch/sponsor_patch.py b/ubuntutools/sponsor_patch/sponsor_patch.py index bc6cf1f..5e91b06 100644 --- a/ubuntutools/sponsor_patch/sponsor_patch.py +++ b/ubuntutools/sponsor_patch/sponsor_patch.py @@ -27,7 +27,8 @@ from distro_info import UbuntuDistroInfo from launchpadlib.launchpad import Launchpad from ubuntutools import subprocess -from ubuntutools.update_maintainer import update_maintainer +from ubuntutools.update_maintainer import (update_maintainer, + MaintainerUpdateException) from ubuntutools.question import input_number from ubuntutools.sponsor_patch.bugtask import BugTask, is_sync @@ -239,8 +240,10 @@ def _create_and_change_into(workdir): def _update_maintainer_field(): """Update the Maintainer field in debian/control.""" Logger.command(["update-maintainer"]) - if update_maintainer("debian", Logger.verbose) != 0: - Logger.error("update-maintainer script failed.") + try: + update_maintainer("debian", Logger.verbose) + except MaintainerUpdateException, e: + Logger.error("update-maintainer failed: %s", str(e)) sys.exit(1) def _update_timestamp():