Attempting to authorize from cron script leads to repeated reauth attempts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
launchpadlib |
Triaged
|
High
|
Unassigned |
Bug Description
Scenario: A cron script want to log in via a pre-existing credentials file that is passed to the login_with() method as the 'credentials_file' parameter. If by mistake that file does not exist, then the call to login_with will attempt to interactively get authorization via the web browser dance.
In launchpadlib/
while credentials.
try:
except HTTPError, e:
if e.response.status == 403:
The sleep period is 1 second. The loop never gives up. Eventually mthaddon hunts you down and wakes you up at 5 a.m. on a national holiday to ask that you kill your script that is hammering Launchpad.
Related branches
- Dimitri John Ledkov (community): Approve
-
Diff: 39 lines (+9/-0)1 file modifiedsrc/launchpadlib/credentials.py (+9/-0)
Changed in launchpadlib: | |
status: | New → Triaged |
Changed in launchpadlib: | |
importance: | Undecided → High |