Skip to content

Commit

Permalink
creds: add a script to fetch the launchpad creds (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
soumyaDghosh authored Oct 16, 2024
1 parent fe43972 commit 73fb24c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions creds_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env python3
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())

0 comments on commit 73fb24c

Please sign in to comment.