Skip to content

Commit 8855e2e

Browse files
authored
Merge pull request #479 from debmc/always
Catch git describe failure
2 parents 2f4d357 + 3ce3ab0 commit 8855e2e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

OpTestConfiguration.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,10 +521,13 @@ def parse_args(self, argv=None):
521521
OpTestLogger.optest_logger_glob.optest_logger.debug(
522522
"conf file defaults={}".format(defaults))
523523
cmd = "git describe --always"
524-
git_output = subprocess.check_output(cmd.split())
525-
# log for triage of how dated the repo is
526-
OpTestLogger.optest_logger_glob.optest_logger.debug(
527-
"op-test-framework git level = {}".format(git_output))
524+
try:
525+
git_output = subprocess.check_output(cmd.split())
526+
# log for triage of how dated the repo is
527+
OpTestLogger.optest_logger_glob.optest_logger.debug(
528+
"op-test-framework git level = {}".format(git_output))
529+
except Exception as e:
530+
OpTestLogger.optest_logger_glob.optest_logger.debug("Unable to get git describe")
528531
# setup AES and Hostlocker configs after the logging is setup
529532
locker_timeout = time.time() + 60*self.args.locker_wait
530533
locker_code = errno.ETIME # 62

0 commit comments

Comments
 (0)