mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
syntax fixes in minion module
This commit is contained in:
parent
bc650ffbc1
commit
d040346ea5
1 changed files with 5 additions and 4 deletions
|
@ -36,7 +36,8 @@ class Minion(object):
|
|||
Parses through the modules in the modules directory and loads up all of
|
||||
the functions.
|
||||
'''
|
||||
# This is going to need some work to clean it up and expand functionality.
|
||||
# This is going to need some work to clean it up and expand
|
||||
# functionality.
|
||||
functions = {}
|
||||
mods = set()
|
||||
mod_dir = os.path.join(distutils.sysconfig.get_python_lib(),
|
||||
|
@ -44,9 +45,9 @@ class Minion(object):
|
|||
for fn_ in os.listdir(mod_dir):
|
||||
if fn_.startswith('__init__.py'):
|
||||
continue
|
||||
if fn_.endswith('.pyo')
|
||||
or fn_.endswith('.py')
|
||||
or fn_.endswith('.pyc'):
|
||||
if fn_.endswith('.pyo')\
|
||||
or fn_.endswith('.py')\
|
||||
or fn_.endswith('.pyc'):
|
||||
mods.add(fn_[:fn_.rindex('.')])
|
||||
for mod in mods:
|
||||
imp = __import__('salt.modules.' + mod)
|
||||
|
|
Loading…
Add table
Reference in a new issue