launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #05425
Re: QA assistance needed : token based librarian
Hi Martin,
On Tue, Nov 02, 2010 at 11:19:12AM -0400, Martin Pitt wrote:
> Kees Cook [2010-11-02 7:25 -0700]:
> > On Tue, Nov 02, 2010 at 10:18:00AM -0400, Martin Pitt wrote:
> > > Great! What magic can I use to connect to that through launchpadlib?
> > > Then I could run the apport test suite against this.
> >
> > Where you use LPNET_SERVICE_ROOT, use "https://api.qastaging.launchpad.net/"
>
> I tried to set the second parameter of login_with to
> "https://api.qastaging.launchpad.net", "api.qastaging.launchpad.net",
> "qastaging.launchpad.net", and "qastaging", and in all cases it failed
> with "<name> is not a valid URL or an alias for any Launchpad server".
I don't use login_with, I use the direct initializer:
try:
credentials = Credentials()
credentials.load(open(credfile))
launchpad = Launchpad(credentials, root, cachedir, version=version)
except:
launchpad = Launchpad.get_token_and_login(sys.argv[0], root, cachedir, version=version)
credfd = tempfile.NamedTemporaryFile(dir=os.path.dirname(credfile))
launchpad.credentials.save(credfd)
os.link(credfd.name, credfile)
credfd.close()
Where version="1.0" and root="https://api.qastaging.launchpad.net/"
-Kees
--
Kees Cook
Ubuntu Security Team
References