syncpackge: Gracefully deal with no available changelog from Debian (PTS

changelogs aren't available immediately)
This commit is contained in:
Stefano Rivera 2011-10-14 22:28:57 +02:00
parent 7abc5b2184
commit fc3d02f28f
2 changed files with 7 additions and 3 deletions

2
debian/changelog vendored
View File

@ -5,6 +5,8 @@ ubuntu-dev-tools (0.133) UNRELEASED; urgency=low
(Closes: #642824)
* Add Depends and Build-Depends for python-distro-info, which has split out
of distro-info.
* syncpackge: Gracefully deal with no available changelog from Debian (PTS
changelogs aren't available immediately)
[ Benjamin Drung ]
* syncpackage: Allow syncing to -proposed with --no-lp.

View File

@ -365,8 +365,9 @@ def copy(src_pkg, release, bugs, simulate=False, force=False):
src_pkg.source, ubuntu_series, ubuntu_pocket,
src_pkg.version)
changes = get_debian_changelog(debian_spph, base_version).strip()
changes = get_debian_changelog(debian_spph, base_version)
if changes:
changes = changes.strip()
Logger.normal("New changes:\n%s", changes)
if simulate:
@ -446,8 +447,9 @@ def close_bugs(bugs, package, version, changes):
"""Close the correct task on all bugs, with changes"""
ubuntu = Launchpad.distributions['ubuntu']
message = ("This bug was fixed in the package %s - %s"
"\n\n---------------\n%s" % (
package, version, changes))
% (package, version))
if changes:
message += "\n\n---------------\n" + changes
for bug in bugs:
bug = Launchpad.bugs[bug]
if bug.duplicate_of is not None: