From f9bed46b993ca08a9e8e01f903f4f6ae32d2b179 Mon Sep 17 00:00:00 2001 From: "BasherSlash@gmail.com" Date: Thu, 26 May 2011 19:43:11 +0000 Subject: still getting 400 bad request but made it so it does not crash --- JKTwitterBot/src/thebot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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. -- cgit v1.2.3