Use $PATH also for dynamips and cleanup some $PATH usages

Fix #655
This commit is contained in:
Julien Duponchelle committed 2016-08-29 11:27:35 +02:00
1 parent 0eafb6f06c
commit da1cd9a3e7
6 files changed
+24 -15

No files matched your search

+5 -3
View File
@@ -139,9 +139,11 @@ class VPCSVM(BaseVM):
:returns: path to VPCS
"""
path = self._manager.config.get_section_config("VPCS").get("vpcs_path", "vpcs")
if path == "vpcs":
path = shutil.which("vpcs")
search_path = self._manager.config.get_section_config("VPCS").get("vpcs_path", "vpcs")
path = shutil.which(search_path)
# shutil.which return None if the path doesn't exists
if not path:
return search_path
return path
@BaseVM.name.setter