Open lengau opened 7 months ago
This gets a basic version, but doesn't really achieve what should be in the docs:
import sys
import tempfile
from launchpadlib.launchpad import Launchpad
from launchpadlib.uris import LPNET_SERVICE_ROOT
with tempfile.NamedTemporaryFile("w+") as credentials_file:
Launchpad.login_with(
application_name="Snapcrafters CI",
service_root=LPNET_SERVICE_ROOT,
credentials_file=credentials_file.name,
version="devel",
consumer_name="Snapcrafters CI"
)
print(credentials_file.read())
I think the tokenator is the best repo for this issue.
What changes would you like?
Grabbing the credentials file that snapcraft generates is mostly okay, but it would be ideal to have a script that'll generate one that:
Any extra information?
It came out of this discussion on Matrix: https://matrix.to/#/!cniCqhKpzVvOBMHAVt:matrix.org/$EWg88A8PPRwiC2IBGh671MiVjvVZlYp14287woJKw04
I'm mostly filing this as a TODO for myself, but if anyone else happens to do it before I get around to it I'll be grateful :-)