Properly handle creation of TIAF historic workspace directory (#2006)

* Fix historic working dir creation

Signed-off-by: John <jonawals@amazon.com>

* Add new line at EOF

Signed-off-by: John <jonawals@amazon.com>

* Removing extra whitespace at end of file

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Log global exception caught by TIAF driver

Signed-off-by: John <jonawals@amazon.com>

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
This commit is contained in:
jonawals
2021-07-09 04:13:44 +01:00
committed by GitHub
parent 7362d461c0
commit 54138bb04c
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ class TestImpact:
self.__has_src_commit = True
def __write_last_run_hash(self, last_run_hash):
os.mkdir(self.__historic_workspace)
os.makedirs(self.__historic_workspace, exist_ok=True)
f = open(self.__last_commit_hash_path, "w")
f.write(last_run_hash)
f.close()
@@ -60,6 +60,6 @@ if __name__ == "__main__":
# Non-gating will be removed from this script and handled at the job level in SPEC-7413
#sys.exit(return_code)
sys.exit(0)
except:
except Exception as e:
# Non-gating will be removed from this script and handled at the job level in SPEC-7413
sys.exit(0)
print(f"Exception caught by TIAF driver: {e}")