summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dovetail/prepare_env.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/dovetail/prepare_env.py b/dovetail/prepare_env.py
index 7573fb6e..9cf0f4f0 100644
--- a/dovetail/prepare_env.py
+++ b/dovetail/prepare_env.py
@@ -8,6 +8,7 @@
#
import platform
+
import utils.dovetail_logger as dt_logger
import utils.dovetail_utils as dt_utils
@@ -48,12 +49,19 @@ def get_docker_pkgname(os):
else:
return None
-logger = dt_logger.Logger('prepare_env.py').getLogger()
-os_name = get_os_lower()
-cmd = "sudo %s -y install %s python-pip" \
- % (get_install_bin(os_name), get_docker_pkgname(os_name))
-dt_utils.exec_cmd(cmd, logger)
+def main():
+ """Dovetail prepare env main"""
+ logger = dt_logger.Logger('prepare_env.py').getLogger()
+
+ os_name = get_os_lower()
+ cmd = "sudo %s -y install %s python-pip" \
+ % (get_install_bin(os_name), get_docker_pkgname(os_name))
+ dt_utils.exec_cmd(cmd, logger)
+
+ cmd = "sudo pip install click pyyaml jinja2"
+ dt_utils.exec_cmd(cmd, logger)
+
-cmd = "sudo pip install click pyyaml jinja2"
-dt_utils.exec_cmd(cmd, logger)
+if __name__ == '__main__':
+ main()