except LdbError as e5:
(enum, estr) = e5.args
if "unpriv-add-error" in attrs[test_name]:
- self.assertGotLdbError(attrs[test_name]["unpriv-add-error"], \
- enum)
+ self.assertGotLdbError(attrs[test_name]["unpriv-add-error"],
+ enum)
else:
- self.assertGotLdbError(attrs[test_name]["unpriv-error"], \
- enum)
+ self.assertGotLdbError(attrs[test_name]["unpriv-error"],
+ enum)
elif "only-2" in attrs[test_name] and \
attrs[test_name]["only-2"] != objectclass:
try:
UF_SERVER_TRUST_ACCOUNT]:
account_type_str = dsdb.user_account_control_flag_bit_to_string(account_type)
for objectclass in ["computer", "user"]:
- for name in [("oc_uac_lock$", "withdollar"), \
+ for name in [("oc_uac_lock$", "withdollar"),
("oc_uac_lock", "plain")]:
test_name = f"{account_type_str}_{objectclass}_{priv[1]}_{name[1]}"
cls.generate_dynamic_test("test_objectclass_uac_dollar_lock",
try:
self.admin_samdb.add(msg_dict)
- if (objectclass == "user" \
+ if (objectclass == "user"
and account_type != UF_NORMAL_ACCOUNT):
self.fail("Able to create {account_type_str} on {objectclass}")
except LdbError as e:
print("No DC found. Your provision is most probably broken!")
return False
elif len(res) != 1:
- print("Found %d domain controllers. For the moment " \
- "upgradeprovision is not able to handle an upgrade on a " \
- "domain with more than one DC. Please demote the other " \
+ print("Found %d domain controllers. For the moment "
+ "upgradeprovision is not able to handle an upgrade on a "
+ "domain with more than one DC. Please demote the other "
"DC(s) before upgrading") % len(res)
return False
else: