Running analyze.py with no options shows an error message
edmorley opened this issue · 4 comments
STR:
./analyze.py
Expected:
Just the usage info, ie:
usage:
...
Actual:
An error prior to the usage info:
ERROR:root:invalid input file
usage:
...
I updated the example to show that the first positional argument should be a file containing json results, when -t
is not given.
This is different from #115, and still reproduces on latest master.
Specifically the string "ERROR:root:invalid input file" is still present in the output if run with no options (per OP).
This is normal and expected: you're invoking the script without the necessary argument, and the argparser indicates what failed then display the usage. Without that error, there would be no indication of why the invocation failed.
Normally when a command line program is run without any options, the usage info is printed as-is without an error, or a plain english error is shown along with possibly the usage info.
The error shown here is a Python logger style error that looks unintended, hence filing this issue.
However seeing as this is in fact the intended (albeit surprising) behaviour, I'm fine with this being closed - I was just doing due diligence by filing :-)