mirror of
https://github.com/lubuntu-team/masspackagelp.git
synced 2025-08-12 08:04:05 +00:00
Added file, should work
This commit is contained in:
commit
8898420325
18
main.py
Normal file
18
main.py
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import sys
|
||||||
|
import launchpadlib
|
||||||
|
from launchpadlib.launchpad import Launchpad
|
||||||
|
def no_credential():
|
||||||
|
print("Can't proceed without Launchpad credentials.")
|
||||||
|
sys.exit()
|
||||||
|
launchpad = Launchpad.login_with('Mass package bug subscription adder', 'staging', credential_save_failed=no_credential)
|
||||||
|
teamtowrite = (raw_input('What person/team would you like to use for this(ID not full name)? '))
|
||||||
|
filepath = (raw_input('Please specify the path of the input file: '))
|
||||||
|
with open(filepath, "r") as ins:
|
||||||
|
filearray = []
|
||||||
|
for line in ins:
|
||||||
|
filearray.append(line)
|
||||||
|
for i in range(len(filearray)):
|
||||||
|
print("Assigning:")
|
||||||
|
print(filearray[i])
|
||||||
|
lp.distributions['ubuntu'].getSourcePackage(name=filearray[i]).addBugSubscription(subscriber=lp.people[teamtowrite])
|
||||||
|
print("Complete")
|
Loading…
x
Reference in New Issue
Block a user