Skip to content
Commit aaf6e9a0 authored by segfault's avatar segfault Committed by intrigeri
Browse files

Minor improvements / nitpicking

- Use argparse's "required" parameter instead of checking if the
  argument is None.
- Drop stream parameter from logging.basicConfig because sys.stderr is used by
  default.
- Don't catch exceptions only for printing them to stderr and exiting
  with exit code 1, because that is exactly what happens if an exception
  is not caught.
- Don't use sys.exit(main()) with a main function that doesn't return
  anything.

Clarification wrt. "Don't catch exceptions only for printing them […]": the
behavior _is_ different in that before this commit, we would hide the resulting
stacktrace. But there's no situation in which we expect main() to raise an
exception here, so IMO hiding exceptions was a bug. Thank you for fixing
it :) -- intrigeri
parent e5e98537
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment