Skip to content

Commit

Permalink
make task failures quiet if quiet is set
Browse files Browse the repository at this point in the history
  • Loading branch information
aappleby committed Mar 7, 2024
1 parent f374237 commit 1154e28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions hancho.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,10 @@ async def async_call(self):
# If this task failed, we print the error and propagate a Cancel
# exception to downstream tasks.
except Exception as err: # pylint: disable=broad-except
log(color(255, 128, 128))
traceback.print_exception(err)
log(color())
sys.stdout.flush()
if not self.quiet:
log(color(255, 128, 128))
traceback.print_exception(err)
log(color())
this.tasks_fail += 1
return Cancel()

Expand Down
1 change: 0 additions & 1 deletion tests/sync_command.hancho
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@


def sync_command(task):
print("hello world")
touch(task.files_out[0])
return task.files_out

Expand Down

0 comments on commit 1154e28

Please sign in to comment.