Skip to content

Commit 9ceeb7f

Browse files
committed
fixup! Added get-dependencies option to install_pack.py
1 parent edcaec2 commit 9ceeb7f

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

st2common/st2common/cmd/install_pack.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from st2common.util.pack_management import download_pack
2727
from st2common.util.pack_management import get_and_set_proxy_config
2828
from st2common.util.virtualenvs import setup_pack_virtualenv
29-
from st2common.content.utils import get_pack_base_path
29+
from st2common.content.utils import get_pack_base_path, get_packs_base_paths
3030

3131
__all__ = ["main"]
3232

@@ -71,17 +71,19 @@ def get_pack_dependencies(pack, verify_ssl, force, dependencies, proxy_config):
7171
try:
7272
pack_metadata = get_pack_metadata(pack_dir=pack_path)
7373
result = pack_metadata.get("dependencies", None)
74-
except Exception:
75-
LOG.error("Could not open pack.yaml at location %s" % pack_path)
76-
result = None
77-
finally:
7874
if result:
7975
LOG.info('Getting pack dependencies for pack "%s"' % (pack))
8076
download_packs(result, verify_ssl, force, dependencies, proxy_config)
8177
LOG.info('Successfully got pack dependencies for pack "%s"' % (pack))
78+
except IOError:
79+
LOG.error("Could not open pack.yaml at location %s" % pack_path)
80+
result = None
8281

8382

8483
def download_packs(packs, verify_ssl, force, dependencies, proxy_config):
84+
packs_base_paths = get_packs_base_paths()
85+
LOG.info(packs_base_paths)
86+
8587
for pack in packs:
8688
if pack in listdir("/opt/stackstorm/packs"):
8789
LOG.info('Pack already installed "%s"' % (pack))

0 commit comments

Comments
 (0)