Misc typo fixes in module_utils (#76564)

pull/76907/head
Abhijeet Kasurde 3 years ago committed by GitHub
parent b1d6750e8b
commit fee90b15a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -67,7 +67,7 @@ def is_executable(path):
# This function's signature needs to be repeated
# as the first line of its docstring.
# This method is reused by the basic module,
# the repetion helps the basic module's html documentation come out right.
# the repetition helps the basic module's html documentation come out right.
# http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_docstring_signature
'''is_executable(path)

@ -395,7 +395,7 @@ namespace Ansible.AccessToken
{
SafeNativeHandle hToken;
if (!NativeMethods.OpenProcessToken(hProcess, access, out hToken))
throw new Win32Exception(String.Format("Failed to open proces token with access {0}",
throw new Win32Exception(String.Format("Failed to open process token with access {0}",
access.ToString()));
return hToken;

@ -80,7 +80,7 @@ namespace Ansible.Become
public enum SECURITY_LOGON_TYPE
{
System = 0, // Used only by the Sytem account
System = 0, // Used only by the System account
Interactive = 2,
Network,
Batch,

@ -165,7 +165,7 @@ class LinuxHardware(Hardware):
i = 0
vendor_id_occurrence = 0
model_name_occurrence = 0
processor_occurence = 0
processor_occurrence = 0
physid = 0
coreid = 0
sockets = {}
@ -219,7 +219,7 @@ class LinuxHardware(Hardware):
if key == 'model name':
model_name_occurrence += 1
if key == 'processor':
processor_occurence += 1
processor_occurrence += 1
i += 1
elif key == 'physical id':
physid = val
@ -248,7 +248,7 @@ class LinuxHardware(Hardware):
# The fields for Power CPUs include 'processor' and 'cpu'.
# Always use 'processor' count for ARM and Power systems
if collected_facts.get('ansible_architecture', '').startswith(('armv', 'aarch', 'ppc')):
i = processor_occurence
i = processor_occurrence
# FIXME
if collected_facts.get('ansible_architecture') != 's390x':
@ -281,7 +281,7 @@ class LinuxHardware(Hardware):
# if the number of processors available to the module's
# thread cannot be determined, the processor count
# reported by /proc will be the default:
cpu_facts['processor_nproc'] = processor_occurence
cpu_facts['processor_nproc'] = processor_occurrence
try:
cpu_facts['processor_nproc'] = len(

@ -28,7 +28,7 @@ Function Get-ExecutablePath {
Get's the full path to an executable, will search the directory specified or ones in the PATH env var.
.PARAMETER executable
[String]The executable to seach for.
[String]The executable to search for.
.PARAMETER directory
[String] If set, the directory to search in.

@ -78,7 +78,7 @@ Function Convert-ToSID {
}
else {
# when in a domain NTAccount(String) will favour domain lookups check
# if username is a local user and explictly search on the localhost for
# if username is a local user and explicitly search on the localhost for
# that account
$adsi = [ADSI]("WinNT://$env:COMPUTERNAME,computer")
$user = $adsi.psbase.children | Where-Object { $_.schemaClassName -eq "user" -and $_.Name -eq $username }

@ -265,7 +265,7 @@ Function Get-AnsibleWebRequest {
# proxy to work with, otherwise just ignore the credentials property.
if ($null -ne $proxy) {
if ($ProxyUseDefaultCredential) {
# Weird hack, $web_request.Proxy returns an IWebProxy object which only gurantees the Credentials
# Weird hack, $web_request.Proxy returns an IWebProxy object which only guarantees the Credentials
# property. We cannot set UseDefaultCredentials so we just set the Credentials to the
# DefaultCredentials in the CredentialCache which does the same thing.
$proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials

@ -100,7 +100,7 @@ def get_ps(module, pattern):
if rc == 0:
for line in psout.splitlines():
if pattern in line:
# FIXME: should add logic to prevent matching 'self', though that should be extreemly rare
# FIXME: should add logic to prevent matching 'self', though that should be extremely rare
found = True
break
return found

@ -850,7 +850,7 @@ def RedirectHandlerFactory(follow_redirects=None, validate_certs=True, ca_path=N
# Be conciliant with URIs containing a space
newurl = newurl.replace(' ', '%20')
# Suport redirect with payload and original headers
# Support redirect with payload and original headers
if code in (307, 308):
# Preserve payload and headers
headers = req.headers

Loading…
Cancel
Save