Rev 5250: Allow login by url in lp_api. in http://bazaar.launchpad.net/~lifeless/bzr/fetch-proposed

Robert Collins robertc at robertcollins.net
Sat May 22 10:34:05 BST 2010


At http://bazaar.launchpad.net/~lifeless/bzr/fetch-proposed

------------------------------------------------------------
revno: 5250
revision-id: robertc at robertcollins.net-20100522093356-upg22l8r2z5b308a
parent: robertc at robertcollins.net-20100521214921-lvudo5cqxreef010
committer: Robert Collins <robertc at robertcollins.net>
branch nick: fetch-proposed
timestamp: Sat 2010-05-22 21:33:56 +1200
message:
  Allow login by url in lp_api.
=== modified file 'bzrlib/plugins/launchpad/lp_api.py'
--- a/bzrlib/plugins/launchpad/lp_api.py	2010-05-21 21:49:21 +0000
+++ b/bzrlib/plugins/launchpad/lp_api.py	2010-05-22 09:33:56 +0000
@@ -102,7 +102,7 @@
         raise InvalidLaunchpadInstance(lp_instance)
 
 
-def login(service, timeout=None, proxy_info=None):
+def login_url(url, timeout=None, proxy_info=None):
     """Log in to the Launchpad API.
 
     :return: The root `Launchpad` object from launchpadlib.
@@ -117,6 +117,14 @@
     return launchpad
 
 
+def login(service, timeout=None, proxy_info=None):
+    """Log in to the Launchpad API.
+
+    :return: The root `Launchpad` object from launchpadlib.
+    """
+    return login_url(_get_api_url(service), timeout, proxy_info)
+
+
 class LaunchpadBranch(object):
     """Provide bzr and lp API access to a Launchpad branch."""
 




More information about the bazaar-commits mailing list