Skip to content

Commit

Permalink
fix: cast exception to string
Browse files Browse the repository at this point in the history
  • Loading branch information
MSchmoecker committed May 30, 2024
1 parent c430faf commit 99f71fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions controller/thymis_controller/task/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,16 @@ async def run(self):

r = await proc.wait()
if r != 0:
raise Exception(f"Command failed with return code {r}")
raise Exception(
f"Command {self.program} {' '.join(self.args)} failed with exit code {r}"
)
return r

def get_model(self) -> models.CommandTask:
return models.CommandTask(
display_name=self.display_name,
state=self.state,
exception=self.exception,
exception=str(self.exception),
stdout=self.stdout.decode(),
stderr=self.stderr.decode(),
)
Expand Down

0 comments on commit 99f71fc

Please sign in to comment.