mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-27 08:50:38 +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>`_
|
- `ErgoZ Riftbit Vaper <https://github.com/ergoz>`_
|
||||||
- `Eugene Lisitsky <https://github.com/lisitsky>`_
|
- `Eugene Lisitsky <https://github.com/lisitsky>`_
|
||||||
- `Eugenio Panadero <https://github.com/azogue>`_
|
- `Eugenio Panadero <https://github.com/azogue>`_
|
||||||
|
- `Evan Haberecht <https://github.com/habereet>`_
|
||||||
- `evgfilim1 <https://github.com/evgfilim1>`_
|
- `evgfilim1 <https://github.com/evgfilim1>`_
|
||||||
- `franciscod <https://github.com/franciscod>`_
|
- `franciscod <https://github.com/franciscod>`_
|
||||||
- `Hugo Damer <https://github.com/HakimusGIT>`_
|
- `Hugo Damer <https://github.com/HakimusGIT>`_
|
||||||
|
|
|
@ -333,11 +333,10 @@ class ConversationHandler(Handler):
|
||||||
def update_state(self, new_state, key):
|
def update_state(self, new_state, key):
|
||||||
if new_state == self.END:
|
if new_state == self.END:
|
||||||
if key in self.conversations:
|
if key in self.conversations:
|
||||||
|
# If there is no key in conversations, nothing is done.
|
||||||
del self.conversations[key]
|
del self.conversations[key]
|
||||||
if self.persistent:
|
if self.persistent:
|
||||||
self.persistence.update_conversation(self.name, key, None)
|
self.persistence.update_conversation(self.name, key, None)
|
||||||
else:
|
|
||||||
pass
|
|
||||||
|
|
||||||
elif isinstance(new_state, Promise):
|
elif isinstance(new_state, Promise):
|
||||||
self.conversations[key] = (self.conversations.get(key), new_state)
|
self.conversations[key] = (self.conversations.get(key), new_state)
|
||||||
|
|
Loading…
Add table
Reference in a new issue