Skip to content
Snippets Groups Projects
Commit e7b9e97a authored by Rafael Guterres Jeffman's avatar Rafael Guterres Jeffman
Browse files

Fix pylint warnings for name redefinition.

parent afb64419
No related branches found
No related tags found
No related merge requests found
...@@ -271,9 +271,9 @@ else: ...@@ -271,9 +271,9 @@ else:
'%Y-%m-%d %H:%MZ', # non-ISO 8601, minute precision '%Y-%m-%d %H:%MZ', # non-ISO 8601, minute precision
] ]
for date_format in accepted_date_formats: for _date_format in accepted_date_formats:
try: try:
return datetime.strptime(value, date_format) return datetime.strptime(value, _date_format)
except ValueError: except ValueError:
pass pass
raise ValueError("Invalid date '%s'" % value) raise ValueError("Invalid date '%s'" % value)
......
...@@ -399,11 +399,11 @@ def main(): ...@@ -399,11 +399,11 @@ def main():
("ipasearchrecordslimit", -1, 2147483647), ("ipasearchrecordslimit", -1, 2147483647),
("ipapwdexpadvnotify", 0, 2147483647), ("ipapwdexpadvnotify", 0, 2147483647),
] ]
for arg, min, max in args_with_limits: for arg, minimum, maximum in args_with_limits:
if arg in params and (params[arg] > max or params[arg] < min): if arg in params and (params[arg] > maximum or params[arg] < minimum):
ansible_module.fail_json( ansible_module.fail_json(
msg="Argument '%s' must be between %d and %d." msg="Argument '%s' must be between %d and %d."
% (arg, min, max)) % (arg, minimum, maximum))
changed = False changed = False
exit_args = {} exit_args = {}
......
...@@ -386,8 +386,8 @@ def main(): ...@@ -386,8 +386,8 @@ def main():
**exit_args) **exit_args)
# Execute commands # Execute commands
for name, command, args in commands: for _name, command, args in commands:
api_command(ansible_module, command, name, args) api_command(ansible_module, command, _name, args)
changed = True changed = True
except Exception as e: except Exception as e:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment