diff options
author | BasherSlash@gmail.com <BasherSlash@gmail.com> | 2011-05-26 19:43:11 +0000 |
---|---|---|
committer | BasherSlash@gmail.com <BasherSlash@gmail.com> | 2011-05-26 19:43:11 +0000 |
commit | f9bed46b993ca08a9e8e01f903f4f6ae32d2b179 (patch) | |
tree | 5c9a1fd7d6a272659be108998d4003b00f84f2f8 /JKTwitterBot/src/thebot.py | |
parent | d6c61fb58c715d481c0bcd601ce8071f271d0d4f (diff) |
still getting 400 bad request but made it so it does not crash
Diffstat (limited to 'JKTwitterBot/src/thebot.py')
-rw-r--r-- | JKTwitterBot/src/thebot.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/JKTwitterBot/src/thebot.py b/JKTwitterBot/src/thebot.py index 3a72915..69a543f 100644 --- a/JKTwitterBot/src/thebot.py +++ b/JKTwitterBot/src/thebot.py @@ -221,7 +221,10 @@ if __name__ == '__main__': oursleep(5 * 60)
# Pose a question
- pose_question(question[question_count])
+ try:
+ pose_question(question[question_count])
+ except urllib2.HTTPError as e:
+ print '*** Twitter returned an error:\n***%s' % e
question_count = (question_count + 1) % len(question);
# Sleep for a bit to add some realism.
|