If not script file is setted we use the default from VPCS

This commit is contained in:
Julien Duponchelle committed 2015-01-30 14:57:25 +01:00
1 parent 4b62d4d82c
commit 8bc26420b7
2 files changed
+22 -1

No files matched your search

+8 -1
View File
@@ -165,8 +165,15 @@ class VPCSVM(BaseVM):
@property
def startup_script(self):
"""Return the content of the current startup script"""
if self._script_file is None:
return None
# If the default VPCS file exist we use it
path = os.path.join(self.working_dir, 'startup.vpc')
if os.path.exists(path):
self._script_file = path
else:
return None
try:
with open(self._script_file) as f:
return f.read()