James, you're right, it happens when the credentials file is empty.

$ echo > ~/.cache/apport/launchpad.credentials

$ apport-collect -p linux 412704
Logging into Launchpad... You have to allow "Change anything" privileges.
Downloading bug information...
Traceback (most recent call last):
  File "/usr/bin/apport-collect", line 106, in <module>
    bug = crashdb.launchpad.bugs[int(bug_number)]
  File "/usr/lib/python2.6/dist-packages/apport/crashdb_impl/launchpad.py", 
line 97, in launchpad
    credentials.load(open(self.auth))
  File "/usr/lib/python2.6/dist-packages/launchpadlib/credentials.py", line 83, 
in load
    CREDENTIALS_FILE_VERSION)
lazr.restfulclient.errors.CredentialsFileError: No configuration for version 1

Apport can do something like:

if os.path.exists(self.auth) and os.path.getsize(self.auth) > 1:
    # use existing credentials

-- 
apport-collect crashes due to launchpadlib.errors.CredentialsFileError
https://bugs.launchpad.net/bugs/414055
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to