|
@@ -23,9 +23,11 @@ def ping(update, context):
|
|
|
def is_web_up(update, context):
|
|
|
"""Check LCM http response"""
|
|
|
try:
|
|
|
- conn = httplib.HTTPConnection('lcm.mi.infn.it:443')
|
|
|
+ conn = httplib.HTTPSConnection('lcm.mi.infn.it:443')
|
|
|
conn.request('HEAD', '/')
|
|
|
s = conn.getresponse().status
|
|
|
+ if s == 200:
|
|
|
+ update.message.reply_text(text='Website is OK')
|
|
|
update.message.reply_text(text='Web server replied with code %s ' % s)
|
|
|
except StandardError:
|
|
|
update.message.reply_text(text='An error occurred while connecting')
|
|
@@ -63,7 +65,7 @@ def abuse_150(update, context):
|
|
|
update.message.reply_text(text=insult, quote=False)
|
|
|
|
|
|
|
|
|
-def moarpuddu(bot, update):
|
|
|
+def moarpuddu(update,context):
|
|
|
"""More broken pipes for Puddu"""
|
|
|
update.message.reply_text(text="più broken pipe per Puddu", quote=False)
|
|
|
|