~bac/launchpadlib/keyring

« back to all changes in this revision

Viewing changes to src/launchpadlib/launchpad.py

  • Committer: Leonard Richardson
  • Date: 2011-02-28 16:43:45 UTC
  • mfrom: (115.1.1 1.9.3)
  • Revision ID: leonard.richardson@canonical.com-20110228164345-2uezga14nh5jzt7b
Tags: 1.9.8
[r=benji] Acquire a new access token if Launchpad doesn't recognize the existing one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
        """Helper method to detect an error caused by a bad OAuth token."""
119
119
        return (response.status == 401 and
120
120
                (content.startswith("Expired token")
121
 
                 or content.startswith("Invalid token")))
 
121
                 or content.startswith("Invalid token")
 
122
                 or content.startswith("Unknown access token")))
122
123
 
123
124
    def _request(self, *args):
124
125
        response, content = super(