"==" instead of "is"

with "is" the condition does not get executed for me. Python 3.6.6.
This commit is contained in:
tallero 2018-09-06 20:32:19 +02:00 committed by Aliaksei Levin
parent 7a14de987c
commit 101aa73f13

View File

@ -95,7 +95,7 @@ while True:
event = td_receive()
if event:
# if client is closed, we need to destroy it and create new client
if event['@type'] is 'updateAuthorizationState' and event['authorization_state']['@type'] is 'authorizationStateClosed':
if event['@type'] == 'updateAuthorizationState' and event['authorization_state']['@type'] == 'authorizationStateClosed':
break
# handle an incoming update or an answer to a previously sent request