Fixed AuthError issue (#8 in the issue tracker) - AuthError was being passed one argument too many...

This commit is contained in:
Ryan McGrath 2009-09-21 23:32:15 -04:00
parent 93ea27f1b3
commit 9007722c23
2 changed files with 2 additions and 2 deletions

View file

@ -97,7 +97,7 @@ class setup:
simplejson.load(self.opener.open("http://twitter.com/account/verify_credentials.json")) simplejson.load(self.opener.open("http://twitter.com/account/verify_credentials.json"))
self.authenticated = True self.authenticated = True
except HTTPError, e: except HTTPError, e:
raise AuthError("Authentication failed with your provided credentials. Try again? (%s failure)" % `e.code`, e.code) raise AuthError("Authentication failed with your provided credentials. Try again? (%s failure)" % `e.code`)
elif consumer_secret is not None and consumer_key is not None: elif consumer_secret is not None and consumer_key is not None:
self.consumer = oauth.OAuthConsumer(self.consumer_key, self.consumer_secret) self.consumer = oauth.OAuthConsumer(self.consumer_key, self.consumer_secret)
self.connection = httplib.HTTPSConnection(SERVER) self.connection = httplib.HTTPSConnection(SERVER)

View file

@ -97,7 +97,7 @@ class setup:
simplejson.load(self.opener.open("http://twitter.com/account/verify_credentials.json")) simplejson.load(self.opener.open("http://twitter.com/account/verify_credentials.json"))
self.authenticated = True self.authenticated = True
except HTTPError as e: except HTTPError as e:
raise AuthError("Authentication failed with your provided credentials. Try again? (%s failure)" % repr(e.code), e.code) raise AuthError("Authentication failed with your provided credentials. Try again? (%s failure)" % repr(e.code))
elif consumer_secret is not None and consumer_key is not None: elif consumer_secret is not None and consumer_key is not None:
self.consumer = oauth.OAuthConsumer(self.consumer_key, self.consumer_secret) self.consumer = oauth.OAuthConsumer(self.consumer_key, self.consumer_secret)
self.connection = http.client.HTTPSConnection(SERVER) self.connection = http.client.HTTPSConnection(SERVER)