Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[master] Porting #52001 to master #54609

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions salt/utils/extmods.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import logging
import os
import shutil
import sys

# Import salt libs
import salt.fileclient
Expand Down Expand Up @@ -133,6 +134,12 @@ def sync(opts,
shutil.copyfile(fn_, dest)
ret.append('{0}.{1}'.format(form, relname))

# If the synchronized module is an utils
# directory, we add it to sys.path
for util_dir in opts['utils_dirs']:
if mod_dir.endswith(util_dir) and mod_dir not in sys.path:
sys.path.append(mod_dir)

touched = bool(ret)
if opts['clean_dynamic_modules'] is True:
current = set(_listdir_recursively(mod_dir))
Expand Down