Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejka committed Oct 23, 2024
1 parent d4527c4 commit cb6da9a
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions scripts/data/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def process_batch(job):
capture_output=True,
text=True,
)

if (
result.returncode != 0
or "FAIL" in result.stdout
Expand All @@ -113,13 +113,17 @@ def process_batch(job):
error = result.stdout or result.stderr
if result.returncode == -9:
match = re.search(r"gas_spent=(\d+)", result.stdout)
gas_info = f", gas spent: {int(match.group(1))}" if match else ", no gas info found"
gas_info = (
f", gas spent: {int(match.group(1))}"
if match
else ", no gas info found"
)
error = f"Return code -9, killed by OOM?{gas_info}"
message = error
else:
else:
error_match = re.search(r"error='([^']*)'", error)
message = error_match.group(1) if error_match else ""

logger.error(f"{job} error: {message}")
logger.debug(f"Full error while processing: {job}:\n{error}")
else:
Expand Down

0 comments on commit cb6da9a

Please sign in to comment.