mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
monkeypatching doesn't work right; extend Launchpad.login instead
This commit is contained in:
parent
e6bde18b04
commit
e8b02a39b2
@ -35,7 +35,7 @@ from ubuntutools.config import UDTConfig, ubu_email
|
||||
from ubuntutools.requestsync.mail import (getDebianSrcPkg
|
||||
as requestsync_mail_getDebianSrcPkg)
|
||||
from ubuntutools.requestsync.lp import getDebianSrcPkg, getUbuntuSrcPkg
|
||||
from ubuntutools.lp import udtexceptions, api_version
|
||||
from ubuntutools.lp import udtexceptions
|
||||
from ubuntutools.lp.lpapicache import Distribution, Launchpad
|
||||
from ubuntutools.misc import split_release_pocket
|
||||
from ubuntutools import subprocess
|
||||
@ -450,14 +450,11 @@ def main():
|
||||
if args[0].endswith('.dsc'):
|
||||
parser.error('.dsc files can only be synced using --no-lp.')
|
||||
|
||||
# We need devel for now.
|
||||
api_version = 'devel'
|
||||
|
||||
if options.lpinstance is None:
|
||||
options.lpinstance = config.get_value('LPINSTANCE')
|
||||
|
||||
try:
|
||||
Launchpad.login(service=options.lpinstance)
|
||||
Launchpad.login(service=options.lpinstance, api_version='devel')
|
||||
except IOError:
|
||||
sys.exit(1)
|
||||
|
||||
|
@ -53,7 +53,7 @@ _POCKETS = ('Release', 'Security', 'Updates', 'Proposed', 'Backports')
|
||||
class _Launchpad(object):
|
||||
'''Singleton for LP API access.'''
|
||||
|
||||
def login(self, service=service):
|
||||
def login(self, service=service, api_version=api_version):
|
||||
'''Enforce a non-anonymous login.'''
|
||||
if not self.logged_in:
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user