We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f61a50f commit 3e3203fCopy full SHA for 3e3203f
bot/osmbot_blueprint.py
@@ -11,6 +11,7 @@
11
from bot.osmbot import OsmBot
12
from telegram import Bot as TBot
13
from telegram import error
14
+import sys
15
16
application = Flask(__name__)
17
application.debug = True
@@ -91,8 +92,13 @@ def attend_webhook(token):
91
92
except error.Unauthorized:
93
return 'OK'
94
except Exception as e:
- if e.message == 'Unauthorized':
95
- return 'OK'
+ if sys.version_info.major ==2:
96
+ if e.message == 'Unauthorized':
97
+ return 'OK'
98
+ else:
99
+ if str(e) == 'Unauthorized':
100
101
+
102
print(str(e))
103
import traceback
104
traceback.print_exc()
0 commit comments