mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
* ubuntutools/lp/lpapiwrapper.py: Add a method to enforce a login through the LP API.
This commit is contained in:
parent
5d9ef43b25
commit
d4f6f9079e
@ -33,9 +33,16 @@ class Launchpad(object):
|
||||
''' Singleton for LP API access. '''
|
||||
__lp = None
|
||||
|
||||
def __getattr__(self, attr):
|
||||
def login(self):
|
||||
'''
|
||||
Enforce a login through the LP API.
|
||||
'''
|
||||
if not self.__lp:
|
||||
self.__lp = libsupport.get_launchpad('ubuntu-dev-tools')
|
||||
|
||||
def __getattr__(self, attr):
|
||||
if not self.__lp:
|
||||
self.login()
|
||||
return getattr(self.__lp, attr)
|
||||
|
||||
def __call__(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user