From 5ef61615ceabe80aed0d4adf8bd351c34756f2fb Mon Sep 17 00:00:00 2001 From: Michael Bienia Date: Fri, 11 Feb 2011 15:33:09 +0100 Subject: [PATCH] Use the new web_link attribute of LP objects instead of our own translate_api_web() function. --- debian/changelog | 6 +++++- hugdaylist | 5 ++--- import-bug-from-debian | 7 +++---- massfile | 3 +-- ubuntutools/requestsync/lp.py | 5 ++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/debian/changelog b/debian/changelog index ff09970..08490c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -20,7 +20,11 @@ ubuntu-dev-tools (0.116) UNRELEASED; urgency=low * mk-sbuild: work around apt's invocation of GPG needing root's .gnupg directory to already exist. - -- Kees Cook Tue, 08 Feb 2011 16:00:17 -0800 + [ Michael Bienia ] + * Use the new web_link attribute of LP objects instead of our own + translate_api_web() function. + + -- Michael Bienia Fri, 11 Feb 2011 15:32:12 +0100 ubuntu-dev-tools (0.115) unstable; urgency=low diff --git a/hugdaylist b/hugdaylist index 91aa401..20f885c 100755 --- a/hugdaylist +++ b/hugdaylist @@ -32,8 +32,7 @@ import sys from optparse import OptionParser -from ubuntutools.lp.libsupport import (get_launchpad, translate_web_api, - translate_api_web) +from ubuntutools.lp.libsupport import (get_launchpad, translate_web_api) def check_args(): howmany = -1 @@ -124,7 +123,7 @@ def main(): for i in list(bug_list)[:howmany]: bug = i.bug print '|| [%s %s] || %s || ||' % \ - (translate_api_web(bug.self_link), bug.id, bug.title) + (bug.web_link, bug.id, bug.title) if __name__ == '__main__': diff --git a/import-bug-from-debian b/import-bug-from-debian index e397bae..5f3913f 100755 --- a/import-bug-from-debian +++ b/import-bug-from-debian @@ -30,7 +30,7 @@ import subprocess import SOAPpy from ubuntutools.config import UDTConfig -from ubuntutools.lp.libsupport import get_launchpad, translate_api_web +from ubuntutools.lp.libsupport import get_launchpad def main(): bug_re = re.compile(r"bug=(\d+)") @@ -119,10 +119,9 @@ def main(): d_watch = u_bug.addWatch(remote_bug=bug_num, bug_tracker=lp_debbugs) d_task.bug_watch = d_watch d_task.lp_save() - web_url = translate_api_web(u_bug.self_link) - print "Opened %s" % web_url + print "Opened %s" % u_bug.web_link if not options.browserless: - subprocess.call(["xdg-open", web_url]) + subprocess.call(["xdg-open", u_bug.web_link]) if __name__ == '__main__': main() diff --git a/massfile b/massfile index b979ce0..65cd8f4 100755 --- a/massfile +++ b/massfile @@ -30,7 +30,6 @@ import email from ubuntutools.config import UDTConfig from ubuntutools.lp.libsupport import (get_launchpad, - translate_api_web, translate_web_api) def read_config(): @@ -94,7 +93,7 @@ def file_bug(config, launchpad): target=product_url, tags=tags) print "Successfully filed bug %i: %s" % \ - (bug.id, translate_api_web(bug.self_link)) + (bug.id, bug.web_link) subscribers = [s for s in [s.strip("\n").strip() for s in config["subscribers"].split(",")] if s] diff --git a/ubuntutools/requestsync/lp.py b/ubuntutools/requestsync/lp.py index ff935c5..701ef15 100644 --- a/ubuntutools/requestsync/lp.py +++ b/ubuntutools/requestsync/lp.py @@ -24,7 +24,6 @@ from ubuntutools.distro_info import DebianDistroInfo from ubuntutools.requestsync.common import raw_input_exit_on_ctrlc from ubuntutools.lp.lpapicache import (Launchpad, Distribution, PersonTeam, DistributionSourcePackage) -from ubuntutools.lp.libsupport import translate_api_web def getDebianSrcPkg(name, release): debian = Distribution('debian') @@ -80,7 +79,7 @@ def checkExistingReports(srcpkg): ' * %s (%s)\n' 'Please check the above URL to verify this before ' 'continuing.' - % (bug.title, translate_api_web(bug.self_link))) + % (bug.title, bug.web_link)) raw_input_exit_on_ctrlc('Press [Enter] to continue or [Ctrl-C] ' 'to abort. ') @@ -115,4 +114,4 @@ def postBug(srcpkg, subscribe, status, bugtitle, bugtext): bug.subscribe(person = PersonTeam(subscribe)()) print ('Sync request filed as bug #%i: %s' - % (bug.id, translate_api_web(bug.self_link))) + % (bug.id, bug.web_link))