Add case for when the source package isn't found.

master
Simon Quigley 7 years ago
parent 74504fe81d
commit 777acdee75

@ -21,5 +21,8 @@ with open(filepath, "r") as ins:
for i in range(len(filearray)):
print("Assigning:")
print(filearray[i])
lp.distributions['ubuntu'].getSourcePackage(name=filearray[i]).addBugSubscription(subscriber=lp.people[teamtowrite])
try:
lp.distributions['ubuntu'].getSourcePackage(name=filearray[i]).addBugSubscription(subscriber=lp.people[teamtowrite])
except AttributeError:
print("Source package not found.")
print("Complete")

Loading…
Cancel
Save