MCPcopy Create free account
hub / github.com/StackStorm/st2 / get_packs_base_paths

Function get_packs_base_paths

st2common/st2common/content/utils.py:68–91  ·  view source on GitHub ↗

Return a list of base paths which are searched for integration packs. :rtype: ``list``

()

Source from the content-addressed store, hash-verified

66
67
68def get_packs_base_paths():
69 """
70 Return a list of base paths which are searched for integration packs.
71
72 :rtype: ``list``
73 """
74 system_packs_base_path = get_system_packs_base_path()
75 packs_base_paths = cfg.CONF.content.packs_base_paths or ""
76
77 # Remove trailing colon (if present)
78 if packs_base_paths.endswith(":"):
79 packs_base_paths = packs_base_paths[:-1]
80
81 result = []
82 # System path is always first
83 if system_packs_base_path:
84 result.append(system_packs_base_path)
85
86 packs_base_paths = packs_base_paths.split(":")
87
88 result = result + packs_base_paths
89 result = [path for path in result if path]
90 result = list(OrderedSet(result))
91 return result
92
93
94def check_pack_directory_exists(pack):

Callers 10

_register_packsMethod · 0.90
runMethod · 0.90
validate_actionFunction · 0.90
setup_pack_virtualenvFunction · 0.90
get_pack_base_pathFunction · 0.85
get_pack_directoryFunction · 0.85

Calls 2

OrderedSetClass · 0.90

Tested by 1