use the 'in' operator on a dict instead of has_key

This commit is contained in:
Zhenchao Li 2010-07-07 23:14:29 +08:00
parent 8b66c1e69d
commit 6f5b6f2612
1 changed files with 1 additions and 1 deletions

View File

@ -1508,7 +1508,7 @@ class Interface:
img_name = 'gajim-ft_stopped'
# if we are the sender of the file and the file transfer was initiated with jingle
# send session-terminate stanza
if file_props.has_key('session-type') and file_props['session-type'] == 'jingle':
if 'session-type' in file_props and file_props['session-type'] == 'jingle':
sender = gajim.get_jid_without_resource(file_props['sender'])
jingle_session = gajim.connections[sender].get_jingle_session(sender, file_props['sid'])
jingle_session.end_session()