Skip to content

Commit

Permalink
Print errors to stderr instead of stout (#141)
Browse files Browse the repository at this point in the history
so that they are still visible if you redirect stdout to a file (e.g.
for capturing diff output)
  • Loading branch information
luqasn authored Mar 25, 2023
1 parent 736d34e commit 78861bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flux_local/tool/flux_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def str_presenter(dumper: yaml.Dumper, data: Any) -> Any:
asyncio.run(action.run(**vars(args)))
except FluxException as err:
if args.log_level == "DEBUG":
traceback.print_exc()
print("flux-local error: ", err)
traceback.print_exc(file=sys.stderr)
print("flux-local error: ", err, file=sys.stderr)
sys.exit(1)


Expand Down

0 comments on commit 78861bb

Please sign in to comment.