Merge branch 'master' of https://github.com/LiaungYip/python-telegram-bot into LiaungYip-master

This commit is contained in:
Jannes Höke 2016-09-20 04:10:39 +02:00
commit af3e8c6440
2 changed files with 3 additions and 1 deletions

View file

@ -18,6 +18,7 @@ The following wonderful people contributed directly or indirectly to this projec
- `jh0ker <https://github.com/jh0ker>`_
- `JRoot3D <https://github.com/JRoot3D>`_
- `jlmadurga <https://github.com/jlmadurga>`_
- `Li-aung Yip <https://github.com/LiaungYip>`_
- `macrojames <https://github.com/macrojames>`_
- `naveenvhegde <https://github.com/naveenvhegde>`_
- `njittam <https://github.com/njittam>`_

View file

@ -213,7 +213,8 @@ class ConversationHandler(Handler):
def update_state(self, new_state, key):
if new_state == self.END:
del self.conversations[key]
if key in self.conversations:
del self.conversations[key]
elif isinstance(new_state, Promise):
self.conversations[key] = (self.conversations[key], new_state)