Replace has_key use in Python (#issue1042) (#1132)

* Replaced all uses of dict.has_key(key) in Python code - part 1

* Replaced all uses of dict.has_key(key) in Python code - part 1

* Replaced all uses of dict.has_key(key) in Python code - part 2 (sping)
This commit is contained in:
gedeck
2016-10-28 22:41:57 -04:00
committed by Greg Landrum
parent 893fa41e98
commit 4580160e37
14 changed files with 29 additions and 29 deletions

View File

@@ -9,7 +9,7 @@ def create(db, **issue):
# first we need to create a 'msg' node containing the message
msg = {}
# check if the message was passed on the command line
if issue.has_key('messages'):
if 'messages' in issue:
# from command line
msg['content'] = issue['messages']
else:
@@ -23,7 +23,7 @@ def create(db, **issue):
# resolve linked and multilinked properties
properties = db.issue.getprops()
for key in issue.keys():
if properties.has_key(key):
if key in properties:
if isinstance(properties[key], hyperdb.Link):
if not issue[key].isdigit():
# resolve linked property names into node ids