Misc typo fixes in module_utils (#76564)

pull/76907/head
Abhijeet Kasurde 4 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 # This function's signature needs to be repeated
# as the first line of its docstring. # as the first line of its docstring.
# This method is reused by the basic module, # 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 # http://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_docstring_signature
'''is_executable(path) '''is_executable(path)

@ -395,7 +395,7 @@ namespace Ansible.AccessToken
{ {
SafeNativeHandle hToken; SafeNativeHandle hToken;
if (!NativeMethods.OpenProcessToken(hProcess, access, out 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())); access.ToString()));
return hToken; return hToken;

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

@ -165,7 +165,7 @@ class LinuxHardware(Hardware):
i = 0 i = 0
vendor_id_occurrence = 0 vendor_id_occurrence = 0
model_name_occurrence = 0 model_name_occurrence = 0
processor_occurence = 0 processor_occurrence = 0
physid = 0 physid = 0
coreid = 0 coreid = 0
sockets = {} sockets = {}
@ -219,7 +219,7 @@ class LinuxHardware(Hardware):
if key == 'model name': if key == 'model name':
model_name_occurrence += 1 model_name_occurrence += 1
if key == 'processor': if key == 'processor':
processor_occurence += 1 processor_occurrence += 1
i += 1 i += 1
elif key == 'physical id': elif key == 'physical id':
physid = val physid = val
@ -248,7 +248,7 @@ class LinuxHardware(Hardware):
# The fields for Power CPUs include 'processor' and 'cpu'. # The fields for Power CPUs include 'processor' and 'cpu'.
# Always use 'processor' count for ARM and Power systems # Always use 'processor' count for ARM and Power systems
if collected_facts.get('ansible_architecture', '').startswith(('armv', 'aarch', 'ppc')): if collected_facts.get('ansible_architecture', '').startswith(('armv', 'aarch', 'ppc')):
i = processor_occurence i = processor_occurrence
# FIXME # FIXME
if collected_facts.get('ansible_architecture') != 's390x': if collected_facts.get('ansible_architecture') != 's390x':
@ -281,7 +281,7 @@ class LinuxHardware(Hardware):
# if the number of processors available to the module's # if the number of processors available to the module's
# thread cannot be determined, the processor count # thread cannot be determined, the processor count
# reported by /proc will be the default: # reported by /proc will be the default:
cpu_facts['processor_nproc'] = processor_occurence cpu_facts['processor_nproc'] = processor_occurrence
try: try:
cpu_facts['processor_nproc'] = len( 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. Get's the full path to an executable, will search the directory specified or ones in the PATH env var.
.PARAMETER executable .PARAMETER executable
[String]The executable to seach for. [String]The executable to search for.
.PARAMETER directory .PARAMETER directory
[String] If set, the directory to search in. [String] If set, the directory to search in.

@ -78,7 +78,7 @@ Function Convert-ToSID {
} }
else { else {
# when in a domain NTAccount(String) will favour domain lookups check # 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 # that account
$adsi = [ADSI]("WinNT://$env:COMPUTERNAME,computer") $adsi = [ADSI]("WinNT://$env:COMPUTERNAME,computer")
$user = $adsi.psbase.children | Where-Object { $_.schemaClassName -eq "user" -and $_.Name -eq $username } $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. # proxy to work with, otherwise just ignore the credentials property.
if ($null -ne $proxy) { if ($null -ne $proxy) {
if ($ProxyUseDefaultCredential) { 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 # property. We cannot set UseDefaultCredentials so we just set the Credentials to the
# DefaultCredentials in the CredentialCache which does the same thing. # DefaultCredentials in the CredentialCache which does the same thing.
$proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials $proxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials

@ -100,7 +100,7 @@ def get_ps(module, pattern):
if rc == 0: if rc == 0:
for line in psout.splitlines(): for line in psout.splitlines():
if pattern in line: 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 found = True
break break
return found return found

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

Loading…
Cancel
Save