diff options
author | hongbo tian <hongbo.tianhongbo@huawei.com> | 2016-11-09 07:15:50 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-11-09 07:15:50 +0000 |
commit | b79bf3c4748cb82bdc644efa078d11cff52e98ac (patch) | |
tree | 5b88897868c3a4d6bd68d0d5623076419be22b9c | |
parent | d149ee668234a24429cafc48c6c26a89ec950504 (diff) | |
parent | d46a4ab8f5277fe47c98a54fb1a02d83264bb5bb (diff) |
Merge "dovetail tool: os name bugfix"
-rw-r--r-- | dovetail/prepare_env.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/dovetail/prepare_env.py b/dovetail/prepare_env.py index 3e4d6964..7573fb6e 100644 --- a/dovetail/prepare_env.py +++ b/dovetail/prepare_env.py @@ -12,12 +12,13 @@ import utils.dovetail_logger as dt_logger import utils.dovetail_utils as dt_utils -def get_os(): +def get_os_lower(): """Get distro name. :returns: return distro name as a string """ - return platform.dist()[0] + platform_os = platform.dist()[0] + return platform_os.lower() def get_install_bin(os): @@ -49,7 +50,7 @@ def get_docker_pkgname(os): logger = dt_logger.Logger('prepare_env.py').getLogger() -os_name = get_os() +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) |