mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-29 11:51:08 +00:00
lpapicache: force lp access on login to workaround possibly invalid cached creds
This commit is contained in:
parent
9c1561ff26
commit
562e6b13cd
@ -76,6 +76,12 @@ class _Launchpad(object):
|
|||||||
if not self.logged_in:
|
if not self.logged_in:
|
||||||
self.__lp = LP.login_with('ubuntu-dev-tools', service,
|
self.__lp = LP.login_with('ubuntu-dev-tools', service,
|
||||||
version=api_version)
|
version=api_version)
|
||||||
|
# Unfortunately launchpadlib may 'login' using cached
|
||||||
|
# credentials, without actually verifying if the credentials
|
||||||
|
# are valid; which can lead to this 'login' not actually
|
||||||
|
# logging in.
|
||||||
|
# So, this forces actual LP access here, to force actual login.
|
||||||
|
self.__lp.me
|
||||||
else:
|
else:
|
||||||
raise AlreadyLoggedInError('Already logged in to Launchpad.')
|
raise AlreadyLoggedInError('Already logged in to Launchpad.')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user