mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +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:
@@ -86,7 +86,7 @@ try:
|
||||
system_warning(
|
||||
"The version of gmp you have installed has a known issue regarding " + \
|
||||
"timing vulnerabilities when used with pycrypto. " + \
|
||||
"If possible, you should update it (ie. yum update gmp)."
|
||||
"If possible, you should update it (i.e. yum update gmp)."
|
||||
)
|
||||
warnings.resetwarnings()
|
||||
warnings.simplefilter("ignore")
|
||||
@@ -643,7 +643,7 @@ def _gitinfo():
|
||||
if os.path.isfile(repo_path):
|
||||
try:
|
||||
gitdir = yaml.safe_load(open(repo_path)).get('gitdir')
|
||||
# There is a posibility the .git file to have an absolute path.
|
||||
# There is a possibility the .git file to have an absolute path.
|
||||
if os.path.isabs(gitdir):
|
||||
repo_path = gitdir
|
||||
else:
|
||||
|
||||
@@ -194,7 +194,7 @@ class J2Template(jinja2.environment.Template):
|
||||
This class prevents Jinja2 from running _jinja2_vars through dict()
|
||||
Without this, {% include %} and similar will create new contexts unlike
|
||||
the special one created in template_from_file. This ensures they are all
|
||||
alike, with the exception of potential locals.
|
||||
alike, except for potential locals.
|
||||
'''
|
||||
def new_context(self, vars=None, shared=False, locals=None):
|
||||
return jinja2.runtime.Context(self.environment, vars.add_locals(locals), self.name, self.blocks)
|
||||
@@ -349,7 +349,7 @@ def template_from_string(basedir, data, vars, fail_on_undefined=False):
|
||||
"Make sure your variable name does not contain invalid characters like '-'."
|
||||
)
|
||||
else:
|
||||
raise errors.AnsibleError("an unexpected type error occured. Error was %s" % te)
|
||||
raise errors.AnsibleError("an unexpected type error occurred. Error was %s" % te)
|
||||
return res
|
||||
except (jinja2.exceptions.UndefinedError, errors.AnsibleUndefinedVariable):
|
||||
if fail_on_undefined:
|
||||
|
||||
Reference in New Issue
Block a user