Use the new web_link attribute of LP objects instead of our own

translate_api_web() function.
This commit is contained in:
Michael Bienia 2011-02-11 15:33:09 +01:00
parent 186e6f13da
commit 5ef61615ce
5 changed files with 13 additions and 13 deletions

6
debian/changelog vendored
View File

@ -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 <kees@ubuntu.com> 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 <geser@ubuntu.com> Fri, 11 Feb 2011 15:32:12 +0100
ubuntu-dev-tools (0.115) unstable; urgency=low

View File

@ -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 '||<rowbgcolor="#FFEBBB"> [%s %s] || %s || ||' % \
(translate_api_web(bug.self_link), bug.id, bug.title)
(bug.web_link, bug.id, bug.title)
if __name__ == '__main__':

View File

@ -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()

View File

@ -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]

View File

@ -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))