mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-16 12:25:45 +01:00
Reverting some master files
This commit is contained in:
parent
252abb138d
commit
9b1a55f9e9
3 changed files with 2 additions and 10 deletions
|
@ -363,7 +363,7 @@ To enable our bot to respond to inline queries, we can add the following (you wi
|
|||
... if update.inline_query:
|
||||
... query = bot.update.inline_query.query
|
||||
... results = list()
|
||||
... results.append(InlineQueryResultArticle(query.upper(), 'Caps', query.upper()))
|
||||
... results.append(InlineQueryResultArticle(query.upper(), 'Caps', text_caps))
|
||||
... bot.answerInlineQuery(update.inline_query.id, results)
|
||||
...
|
||||
>>> dispatcher.addTelegramInlineHandler(inline_caps)
|
||||
|
|
|
@ -388,12 +388,7 @@ class Updater(object):
|
|||
|
||||
def signal_handler(self, signum, frame):
|
||||
self.is_idle = False
|
||||
if self.running:
|
||||
self.stop()
|
||||
else:
|
||||
self.logger.warning('Exiting immediately!')
|
||||
import os
|
||||
os._exit(1)
|
||||
self.stop()
|
||||
|
||||
def idle(self, stop_signals=(SIGINT, SIGTERM, SIGABRT)):
|
||||
"""
|
||||
|
|
|
@ -106,9 +106,6 @@ def _try_except_req(func):
|
|||
except HTTPException as error:
|
||||
raise NetworkError('HTTPException: {0!r}'.format(error))
|
||||
|
||||
except socket.error as error:
|
||||
raise NetworkError('socket.error: {0!r}'.format(error))
|
||||
|
||||
return decorator
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue