Please raise CredentialsFileError when file doesn't exist at load() in Credentials class
Bug #434311 reported by
Marco Rodrigues
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lazr.restfulclient |
Triaged
|
Low
|
Unassigned |
Bug Description
Hi!
I'm fixing bug 414055 in Apport and I found that load() function at Credentials class don't raise an exception error when file doesn't exist. It should raise CredentialsFile
After that, I could do some try..except.
Thank you.
description: | updated |
affects: | launchpadlib → lazr.restfulclient |
Changed in lazr.restfulclient: | |
status: | New → Triaged |
importance: | Undecided → Medium |
To post a comment you must log in.
I think it also should raise CredentialsFile Error at load() if consumer and access_token variables are broken for some reason (someone or some software could remove the consumer_key line from credentials file), like save() function currently does.
This will help to catch only one exception from load() function and not the ones from ConfigParser (MissingSection HeaderError, NoOptionError).
Thanks