~vila/udd/split-failures

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import subprocess
import sys

from launchpadlib.credentials import Credentials

web_root="https://edge.launchpad.net/"

creds = Credentials("package-import")
url = creds.get_request_token(web_root=web_root)

subprocess.call(['xdg-open', url])
print("Once you have authenticated then press enter")
sys.stdin.readline()
creds.exchange_request_token_for_access_token(web_root=web_root)

f = open("lp_creds.txt", "wb")
try:
    creds.save(f)
finally:
    f.close()