projects
/
hermes
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b54451f
)
Reimplementation of {c:8a0b67} following garage/git cock-up. Better
author
Andrew Flegg
<andrew@bleb.org>
Sun, 2 Jan 2011 20:03:58 +0000
(20:03 +0000)
committer
Andrew Flegg
<andrew@bleb.org>
Sun, 2 Jan 2011 20:03:58 +0000
(20:03 +0000)
catches Twitter expired credentials.
package/src/org/maemo/hermes/engine/twitter/api.py
patch
|
blob
|
history
diff --git
a/package/src/org/maemo/hermes/engine/twitter/api.py
b/package/src/org/maemo/hermes/engine/twitter/api.py
index
b20032c
..
95cdf61
100644
(file)
--- a/
package/src/org/maemo/hermes/engine/twitter/api.py
+++ b/
package/src/org/maemo/hermes/engine/twitter/api.py
@@
-28,7
+28,10
@@
class TwitterApi():
json = self._make_api_request(url % (cursor))
data = simplejson.loads(json)
if 'error' in data:
- raise Exception(data['error'])
+ if data['error'] == 'This method requires authentication.':
+ raise CredentialsExpiredException('Twitter')
+ else:
+ raise Exception(data['error'])
for x in data['users']:
users.append(User.NewFromJsonDict(x))