mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #3 from cro/ab_rootdirfix
When running testsuite, salt.syspaths.ROOT_DIR is often empty.
This commit is contained in:
commit
c7715acd53
1 changed files with 2 additions and 2 deletions
|
@ -1752,7 +1752,8 @@ def prepend_root_dir(opts, path_options):
|
|||
for path_option in path_options:
|
||||
if path_option in opts:
|
||||
path = opts[path_option]
|
||||
if path == def_root_dir or path.startswith(def_root_dir + os.sep):
|
||||
# When running testsuite, salt.syspaths.ROOT_DIR is often empty
|
||||
if def_root_dir != '' and (path == def_root_dir or path.startswith(def_root_dir + os.sep)):
|
||||
# Remove the default root dir so we can add the override
|
||||
path = path[len(def_root_dir):]
|
||||
elif path == root_opt or path.startswith(root_opt + os.sep):
|
||||
|
@ -1765,7 +1766,6 @@ def prepend_root_dir(opts, path_options):
|
|||
# Prepending the root dir
|
||||
opts[path_option] = salt.utils.path_join(root_dir, path)
|
||||
|
||||
|
||||
def insert_system_path(opts, paths):
|
||||
'''
|
||||
Inserts path into python path taking into consideration 'root_dir' option.
|
||||
|
|
Loading…
Add table
Reference in a new issue