Skip to content

Commit

Permalink
Fix Tool Meister instance exit code handling
Browse files Browse the repository at this point in the history
From testing we noticed that the `start()` method was not properly
returning the exit code from the `driver()` method.  We also remove
the gaps in the error codes returned.
  • Loading branch information
portante committed May 5, 2022
1 parent 947662f commit 28f95ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pbench/agent/tool_meister.py
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,7 @@ def driver(
logger.debug("waiting ...")
except Exception:
logger.exception("Unexpected error encountered")
ret_val = 10
ret_val = 8
finally:
if rh.errors > 0 or rh.redis_errors > 0 or rh.dropped > 0:
logger.warning(
Expand Down Expand Up @@ -1956,7 +1956,7 @@ def daemon(
parsed.port,
exc,
)
return 8
return 7
else:
logger.debug("re-constructed Redis server object")
return driver(
Expand Down Expand Up @@ -2064,7 +2064,7 @@ def start(prog: Path, parsed: Arguments) -> int:
return 6

func = daemon if parsed.daemonize else driver
func(
return func(
PROG,
tar_path,
sysinfo_dump,
Expand Down

0 comments on commit 28f95ca

Please sign in to comment.