mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-05-28 09:11:38 +00:00
ubuntutools/lp/libsupport.py: Support production API URLs in
translate_web_api.
This commit is contained in:
parent
e55766b0d9
commit
a2a4fc785d
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -30,6 +30,8 @@ ubuntu-dev-tools (0.103) UNRELEASED; urgency=low
|
||||
* Add manpages for sponsor-patch and import-bug-from-debian.
|
||||
* hugdaylist, manage-credentials, massfile, merge-changelog,
|
||||
ubuntutools/requestsync/common.py: Some pyflakes-induced cleanup.
|
||||
* ubuntutools/lp/libsupport.py: Support production API URLs in
|
||||
translate_web_api.
|
||||
|
||||
-- Benjamin Drung <bdrung@ubuntu.com> Tue, 21 Sep 2010 23:52:46 +0200
|
||||
|
||||
|
@ -92,8 +92,10 @@ def query_to_dict(query_string):
|
||||
def translate_web_api(url, launchpad):
|
||||
scheme, netloc, path, query, fragment = urlparse.urlsplit(url)
|
||||
query = query_to_dict(query)
|
||||
if not (("edge" in netloc and "edge" in str(launchpad._root_uri))
|
||||
or ("staging" in netloc and "staging" in str(launchpad._root_uri))):
|
||||
|
||||
differences = set(netloc.split('.')).symmetric_difference(
|
||||
set(launchpad._root_uri.host.split('.')))
|
||||
if ('staging' in differences or 'edge' in differences):
|
||||
raise ValueError("url conflict (url: %s, root: %s" %(url, launchpad._root_uri))
|
||||
if path.endswith("/+bugs"):
|
||||
path = path[:-6]
|
||||
|
Loading…
x
Reference in New Issue
Block a user