File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class CHECK(Enum):
23
23
FALSE = 2
24
24
25
25
26
- def save_to_file (path , data ):
26
+ def save_to_file (hostname , path , data ):
27
27
""" Save data to a file in the workspace directory.
28
28
29
29
Args:
@@ -37,7 +37,7 @@ def save_to_file(path, data):
37
37
if not os .path .exists (WORKSPACE_DIR + path ):
38
38
os .makedirs (WORKSPACE_DIR + path )
39
39
40
- with open (os .path .join (WORKSPACE_DIR + path ), "w" ) as file :
40
+ with open (os .path .join (WORKSPACE_DIR + path + hostname + '.txt' ), "w" ) as file :
41
41
file .write (data )
42
42
43
43
@@ -87,8 +87,8 @@ def check_for_uncommitted_changes(hostname):
87
87
88
88
if ssh_process ['success' ]:
89
89
# log the output to a workspace file for viewing later
90
- save_to_file ( os . path . join ( "/git_status/" +
91
- hostname + '.txt' ) , ssh_process ['output' ])
90
+
91
+ save_to_file ( hostname , "/git_status/" , ssh_process ['output' ])
92
92
93
93
if ssh_process ['output' ].strip () != "" :
94
94
return CHECK .TRUE
You can’t perform that action at this time.
0 commit comments