mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-22 14:35:00 +01:00
Removed unneccessary else and replaced with comment (#1247)
* Resolved issue #1163: Removed unneccessary else and replaced with comment * Added myself to AUTHORS.rst
This commit is contained in:
parent
d6d0dec6e0
commit
4861d1a20d
2 changed files with 2 additions and 2 deletions
|
@ -29,6 +29,7 @@ The following wonderful people contributed directly or indirectly to this projec
|
|||
- `ErgoZ Riftbit Vaper <https://github.com/ergoz>`_
|
||||
- `Eugene Lisitsky <https://github.com/lisitsky>`_
|
||||
- `Eugenio Panadero <https://github.com/azogue>`_
|
||||
- `Evan Haberecht <https://github.com/habereet>`_
|
||||
- `evgfilim1 <https://github.com/evgfilim1>`_
|
||||
- `franciscod <https://github.com/franciscod>`_
|
||||
- `Hugo Damer <https://github.com/HakimusGIT>`_
|
||||
|
|
|
@ -333,11 +333,10 @@ class ConversationHandler(Handler):
|
|||
def update_state(self, new_state, key):
|
||||
if new_state == self.END:
|
||||
if key in self.conversations:
|
||||
# If there is no key in conversations, nothing is done.
|
||||
del self.conversations[key]
|
||||
if self.persistent:
|
||||
self.persistence.update_conversation(self.name, key, None)
|
||||
else:
|
||||
pass
|
||||
|
||||
elif isinstance(new_state, Promise):
|
||||
self.conversations[key] = (self.conversations.get(key), new_state)
|
||||
|
|
Loading…
Reference in a new issue