aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahiel@protonmail.ch>2015-11-10 18:06:06 +0100
committerRahiel Kasim <rahiel@protonmail.ch>2015-11-10 18:06:06 +0100
commit1d792532326b5b6fcd72b2051a5a2b2ea44af111 (patch)
treebfe5c9fb4b8351b6b27d5b991dd15bd1c7682184
parent07093a476952a856bedbe085e3ba5a2a68f12ee3 (diff)
print only the messages, flush stdout
-rw-r--r--bismillah.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bismillah.py b/bismillah.py
index 2358c50..144d000 100644
--- a/bismillah.py
+++ b/bismillah.py
@@ -19,6 +19,7 @@
import re
from time import sleep
from urllib2 import URLError
+import sys
import telegram
from redis import StrictRedis
@@ -140,7 +141,7 @@ def serve(bot, update_id, data):
else:
s, a, quran_type = 1, 1, "english"
- print update
+ print message
if chat_id < 0:
continue # bot should not be in a group
@@ -179,6 +180,7 @@ def serve(bot, update_id, data):
s, a = Quran.getRandomAyah()
send_quran(s, a, quran_type, chat_id)
+ sys.stdout.flush()
return update_id