mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00: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:
@@ -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)
|
||||
|
||||
@@ -73,7 +73,7 @@ class Facts(object):
|
||||
"""
|
||||
This class should only attempt to populate those facts that
|
||||
are mostly generic to all systems. This includes platform facts,
|
||||
service facts (eg. ssh keys or selinux), and distribution facts.
|
||||
service facts (e.g. ssh keys or selinux), and distribution facts.
|
||||
Anything that requires extensive code or may have more than one
|
||||
possible implementation to establish facts for a given topic should
|
||||
subclass Facts.
|
||||
@@ -1009,7 +1009,7 @@ class FreeBSDHardware(Hardware):
|
||||
if line.startswith('#') or line.strip() == '':
|
||||
continue
|
||||
fields = re.sub(r'\s+',' ',line.rstrip('\n')).split()
|
||||
self.facts['mounts'].append({'mount': fields[1] , 'device': fields[0], 'fstype' : fields[2], 'options': fields[3]})
|
||||
self.facts['mounts'].append({'mount': fields[1], 'device': fields[0], 'fstype' : fields[2], 'options': fields[3]})
|
||||
|
||||
def get_device_facts(self):
|
||||
sysdir = '/dev'
|
||||
@@ -1136,7 +1136,7 @@ class NetBSDHardware(Hardware):
|
||||
if line.startswith('#') or line.strip() == '':
|
||||
continue
|
||||
fields = re.sub(r'\s+',' ',line.rstrip('\n')).split()
|
||||
self.facts['mounts'].append({'mount': fields[1] , 'device': fields[0], 'fstype' : fields[2], 'options': fields[3]})
|
||||
self.facts['mounts'].append({'mount': fields[1], 'device': fields[0], 'fstype' : fields[2], 'options': fields[3]})
|
||||
|
||||
class AIX(Hardware):
|
||||
"""
|
||||
@@ -1524,7 +1524,7 @@ class LinuxNetwork(Network):
|
||||
if os.path.exists(path):
|
||||
interfaces[device]['all_slaves_active'] = open(path).read() == '1'
|
||||
|
||||
# Check whether a interface is in promiscuous mode
|
||||
# Check whether an interface is in promiscuous mode
|
||||
if os.path.exists(os.path.join(path,'flags')):
|
||||
promisc_mode = False
|
||||
# The second byte indicates whether the interface is in promiscuous mode.
|
||||
|
||||
@@ -241,7 +241,7 @@ class RhsmPools(object):
|
||||
|
||||
def _load_product_list(self):
|
||||
"""
|
||||
Loads list of all availaible pools for system in data structure
|
||||
Loads list of all available pools for system in data structure
|
||||
"""
|
||||
args = "subscription-manager list --available"
|
||||
rc, stdout, stderr = self.module.run_command(args, check_rc=True)
|
||||
@@ -250,7 +250,7 @@ class RhsmPools(object):
|
||||
for line in stdout.split('\n'):
|
||||
# Remove leading+trailing whitespace
|
||||
line = line.strip()
|
||||
# An empty line implies the end of a output group
|
||||
# An empty line implies the end of an output group
|
||||
if len(line) == 0:
|
||||
continue
|
||||
# If a colon ':' is found, parse
|
||||
|
||||
Reference in New Issue
Block a user