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:
Christian Berendt 2014-05-03 18:40:05 +02:00
parent b753625dbf
commit 6676720ce5
22 changed files with 50 additions and 50 deletions

View file

@ -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)