Functions used as console_scripts should not return output text
According to official documentation, the function should return an error code or 0
in case of no error.
Currently the console_scripts
return the output text.
Because of this the return code is always 1
, indicating an error even if everything is fine.
And the text gets sent to stderr instead of stdout, which makes it harder to grep the output.
Proposed solution: Use print
for regular output, return 0
or None
in case of success, return an error code in case of error.