From 9d7c80d52265e7f77fb5b5ea9d987592c49faa30 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 7 Oct 2008 20:41:59 +0000 Subject: [thorstenp] replace has_key by key in dict. Fixes #4392 --- src/profile_window.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/profile_window.py') diff --git a/src/profile_window.py b/src/profile_window.py index 9b204b824..710deac5b 100644 --- a/src/profile_window.py +++ b/src/profile_window.py @@ -262,7 +262,7 @@ class ProfileWindow: entries = entry.split('_') loc = vcard_ if len(entries) == 3: # We need to use lists - if not loc.has_key(entries[0]): + if entries[0] not in loc: loc[entries[0]] = [] found = False for e in loc[entries[0]]: @@ -275,7 +275,7 @@ class ProfileWindow: loc[entries[0]].append({entries[1]: '', entries[2]: txt}) return vcard_ while len(entries) > 1: - if not loc.has_key(entries[0]): + if entries[0] not in loc: loc[entries[0]] = {} loc = loc[entries[0]] del entries[0] @@ -323,7 +323,7 @@ class ProfileWindow: return vcard_ = self.make_vcard() nick = '' - if vcard_.has_key('NICKNAME'): + if 'NICKNAME' in vcard_: nick = vcard_['NICKNAME'] from common import pep pep.user_send_nickname(self.account, nick) -- cgit v1.2.3