Comment 3 for bug 414055

Revision history for this message
Marco Rodrigues (gothicx) wrote :

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