mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix function spacing
This commit is contained in:
parent
da8bca09aa
commit
ebe5d9d85c
1 changed files with 8 additions and 3 deletions
|
@ -7,6 +7,7 @@ Windows Service module.
|
|||
import salt.utils
|
||||
import time
|
||||
import logging
|
||||
import os
|
||||
try:
|
||||
from shlex import quote as _cmd_quote # pylint: disable=E0611
|
||||
except ImportError:
|
||||
|
@ -41,9 +42,13 @@ def has_powershell():
|
|||
|
||||
salt '*' service.has_powershell
|
||||
'''
|
||||
return 'powershell' in __salt__['cmd.run'](
|
||||
['where', 'powershell'], python_shell=False
|
||||
)
|
||||
for path in os.environ["PATH"].split(os.pathsep):
|
||||
path = path.strip('"')
|
||||
fullpath = os.path.join(path, "powershell.exe")
|
||||
fullpath = os.path.normpath(fullpath)
|
||||
if os.path.isfile(fullpath) and os.access(fullpath, os.X_OK):
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def get_enabled():
|
||||
|
|
Loading…
Add table
Reference in a new issue