mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-23 19:01:26 -07:00
fixed typos found by RETF rules in PY files
rules are avaialble at https://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser/Typos
This commit is contained in:
parent
b753625dbf
commit
6676720ce5
22 changed files with 50 additions and 50 deletions
|
@ -570,7 +570,7 @@ class AnsibleModule(object):
|
|||
required = v.get('required', False)
|
||||
if default is not None and required:
|
||||
# not alias specific but this is a good place to check this
|
||||
self.fail_json(msg="internal error: required and default are mutally exclusive for %s" % k)
|
||||
self.fail_json(msg="internal error: required and default are mutually exclusive for %s" % k)
|
||||
if aliases is None:
|
||||
continue
|
||||
if type(aliases) != list:
|
||||
|
@ -991,7 +991,7 @@ class AnsibleModule(object):
|
|||
# Optimistically try a rename, solves some corner cases and can avoid useless work, throws exception if not atomic.
|
||||
os.rename(src, dest)
|
||||
except (IOError,OSError), e:
|
||||
# only try workarounds for errno 18 (cross device), 1 (not permited) and 13 (permission denied)
|
||||
# only try workarounds for errno 18 (cross device), 1 (not permitted) and 13 (permission denied)
|
||||
if e.errno != errno.EPERM and e.errno != errno.EXDEV and e.errno != errno.EACCES:
|
||||
self.fail_json(msg='Could not replace file: %s to %s: %s' % (src, dest, e))
|
||||
|
||||
|
@ -1121,7 +1121,7 @@ class AnsibleModule(object):
|
|||
try:
|
||||
os.chdir(cwd)
|
||||
except (OSError, IOError), e:
|
||||
self.fail_json(rc=e.errno, msg="Could not open %s , %s" % (cwd, str(e)))
|
||||
self.fail_json(rc=e.errno, msg="Could not open %s, %s" % (cwd, str(e)))
|
||||
|
||||
try:
|
||||
cmd = subprocess.Popen(args, **kwargs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue