aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorShawn J. Goff <shawn.goff@accelecon.com>2012-12-17 16:29:16 -0500
committerDan Williams <dcbw@redhat.com>2012-12-17 16:59:48 -0600
commit2a9bb58bd284d228a349b918d5f352cdffc8a1ad (patch)
tree5d514535f73b30ea5eed19355975fa65198723eb /utils
parent31e3155c414d8d4c7e3ec5d9f0d75d37c6ee1c79 (diff)
downloadexternal_libqmi-2a9bb58bd284d228a349b918d5f352cdffc8a1ad.zip
external_libqmi-2a9bb58bd284d228a349b918d5f352cdffc8a1ad.tar.gz
external_libqmi-2a9bb58bd284d228a349b918d5f352cdffc8a1ad.tar.bz2
qmi-codegen python3: fix dict.has_key('key') to 'key' in dict
Python 3 no longer supports the has_key() method. sed regex: s/\([^ ]\+\)\.has_key(\([^)]*\))/\2 in \1/g
Diffstat (limited to 'utils')
-rwxr-xr-xutils/qmidb/Fields.py2
-rwxr-xr-xutils/qmidb/Structs.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/utils/qmidb/Fields.py b/utils/qmidb/Fields.py
index 9df70a2..cd2e86b 100755
--- a/utils/qmidb/Fields.py
+++ b/utils/qmidb/Fields.py
@@ -151,7 +151,7 @@ class Fields:
self.byid[field.id] = field
def has_child(self, fid):
- return self.byid.has_key(fid)
+ return fid in self.byid
def get_child(self, fid):
return self.byid[fid]
diff --git a/utils/qmidb/Structs.py b/utils/qmidb/Structs.py
index 34e001e..f068fc8 100755
--- a/utils/qmidb/Structs.py
+++ b/utils/qmidb/Structs.py
@@ -336,7 +336,7 @@ class Structs(utils.DbFile):
s.validate(fields, self)
def has_child(self, sid):
- return self.structs.has_key(sid)
+ return sid in self.structs
def get_child(self, sid):
return self.structs[sid]