diff options
author | Noel Power <noel.power@suse.com> | 2018-05-11 16:37:44 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2018-06-20 00:18:21 +0200 |
commit | 9e349fe82ad622aa856695ba0aa5d61dc2ca0d82 (patch) | |
tree | 3303f00171c03739db3f14142e0105933177b342 /python/samba/upgradehelpers.py | |
parent | fd35e533f1554c9c8643f62741f25fe7bf8771d5 (diff) | |
download | samba-9e349fe82ad622aa856695ba0aa5d61dc2ca0d82.tar.gz |
python/samba/tests: py2/py3 port has_keys usage
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba/upgradehelpers.py')
-rw-r--r-- | python/samba/upgradehelpers.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/samba/upgradehelpers.py b/python/samba/upgradehelpers.py index 14fe3e024c3..5e5655d74a2 100644 --- a/python/samba/upgradehelpers.py +++ b/python/samba/upgradehelpers.py @@ -489,7 +489,7 @@ def increment_calculated_keyversion_number(samdb, rootdn, hashDns): raise ProvisioningError("Unable to find msDs-KeyVersionNumber") else: for e in entry: - if hashDns.has_key(str(e.dn).lower()): + if str(e.dn).lower() in hashDns: val = e.get("msDs-KeyVersionNumber") if not val: val = "0" @@ -689,7 +689,7 @@ def search_constructed_attrs_stored(samdb, rootdn, attrs): for ent in entry: for att in attrs: if ent.get(att): - if hashAtt.has_key(att): + if att in hashAtt: hashAtt[att][str(ent.dn).lower()] = str(ent[att]) else: hashAtt[att] = {} |