hash_cur = chunck_sddl(cursddl)
hash_ref = chunck_sddl(refsddl)
- if not hash_cur.has_key("owner"):
+ if "owner" not in hash_cur:
txt = "\tNo owner in current SD"
- elif hash_ref.has_key("owner") and hash_cur["owner"] != hash_ref["owner"]:
+ elif "owner" in hash_ref and hash_cur["owner"] != hash_ref["owner"]:
txt = "\tOwner mismatch: %s (in ref) %s" \
"(in current)\n" % (hash_ref["owner"], hash_cur["owner"])
- if not hash_cur.has_key("group"):
+ if "group" not in hash_cur:
txt = "%s\tNo group in current SD" % txt
- elif hash_ref.has_key("group") and hash_cur["group"] != hash_ref["group"]:
+ elif "group" in hash_ref and hash_cur["group"] != hash_ref["group"]:
txt = "%s\tGroup mismatch: %s (in ref) %s" \
"(in current)\n" % (txt, hash_ref["group"], hash_cur["group"])
- parts = [ "dacl" ]
+ parts = ["dacl"]
if checkSacl:
parts.append("sacl")
for part in parts:
- if hash_cur.has_key(part) and hash_ref.has_key(part):
+ if part in hash_cur and part in hash_ref:
# both are present, check if they contain the same ACE
h_cur = set()
txt = "%s\t\t%s ACE is not present in the" \
" current\n" % (txt, item)
- elif hash_cur.has_key(part) and not hash_ref.has_key(part):
+ elif part in hash_cur and part not in hash_ref:
txt = "%s\tReference ACL hasn't a %s part\n" % (txt, part)
- elif not hash_cur.has_key(part) and hash_ref.has_key(part):
+ elif part not in hash_cur and part in hash_ref:
txt = "%s\tCurrent ACL hasn't a %s part\n" % (txt, part)
return txt
len1 = len(tab1)-1
len2 = len(tab2)-1
# Note: python range go up to upper limit but do not include it
+ cmp = lambda x, y: (x > y) - (x < y) # cmp is removed in py3
for i in range(0, minimum):
ret = cmp(tab1[len1-i], tab2[len2-i])
if ret != 0:
hash[str(current[i]["dn"]).lower()] = current[i]["dn"]
for k in hash_new.keys():
- if not hash.has_key(k):
+ if k not in hash:
listMissing.append(hash_new[k])
else:
listPresent.append(hash_new[k])
["PYTHON=%s" % python,
os.path.join(bbdir, "functionalprep.sh"),
'$PREFIX_ABS/provision', configuration])
-planpythontestsuite("none", "samba.tests.upgradeprovision")
+planpythontestsuite("none", "samba.tests.upgradeprovision", py3_compatible=True)
planpythontestsuite("none", "samba.tests.xattr", py3_compatible=True)
planpythontestsuite("none", "samba.tests.ntacls", py3_compatible=True)
planpythontestsuite("none", "samba.tests.policy", py3_compatible=True)