mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-22 18:31:27 -07:00
Fix PEP8 error
This commit is contained in:
parent
8f337edbe9
commit
2fed868087
1 changed files with 3 additions and 1 deletions
|
@ -454,7 +454,9 @@ def validate_account_locking(cursor, account_locking, module):
|
||||||
}
|
}
|
||||||
if any([int(value) < 0 or int(value) > 32767 for value in locking.values() if re.match("[-+]?\\d+$", value)]):
|
if any([int(value) < 0 or int(value) > 32767 for value in locking.values() if re.match("[-+]?\\d+$", value)]):
|
||||||
module.fail_json(msg="Account locking values are out of the valid range (0-32767)")
|
module.fail_json(msg="Account locking values are out of the valid range (0-32767)")
|
||||||
if "PASSWORD_LOCK_TIME" in locking.keys() and not re.match("[-+]?\\d+$", locking.get("PASSWORD_LOCK_TIME")) and locking.get("PASSWORD_LOCK_TIME") != "UNBOUNDED":
|
if ("PASSWORD_LOCK_TIME" in locking.keys()
|
||||||
|
and not re.match("[-+]?\\d+$", locking.get("PASSWORD_LOCK_TIME"))
|
||||||
|
and locking.get("PASSWORD_LOCK_TIME") != "UNBOUNDED"):
|
||||||
module.fail_json(msg="PASSWORD_LOCK_TIME must be an integer between 0 and 32767 or 'UNBOUNDED'")
|
module.fail_json(msg="PASSWORD_LOCK_TIME must be an integer between 0 and 32767 or 'UNBOUNDED'")
|
||||||
return locking
|
return locking
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue