aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahiel@protonmail.ch>2015-11-02 19:29:06 +0100
committerRahiel Kasim <rahiel@protonmail.ch>2015-11-02 19:29:06 +0100
commit7e61e5e67eaee807fb5c6f167b51560c37b3198e (patch)
tree7c5882a8c419d79e2e2906ebb96adaa732771d88
parent2f6513483022b5305d14668c0d5d1833fb3cbe25 (diff)
catch URLError exceptions
-rw-r--r--bismillah.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bismillah.py b/bismillah.py
index 75b1b2a..090f00c 100644
--- a/bismillah.py
+++ b/bismillah.py
@@ -18,6 +18,7 @@
###############################################################################
import re
from time import sleep
+from urllib2 import URLError
import telegram
from redis import StrictRedis
@@ -74,6 +75,8 @@ def main():
sleep(5)
else:
raise e
+ except URLError as e:
+ sleep(2)
def serve(bot, update_id, data):