Opened 11 years ago
Closed 11 years ago
#7560 closed patch (fixed)
jamu.py always exits with error 1
Reported by: | Owned by: | Anduin Withers | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | Plugin - MythVideo | Version: | 0.22 |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
As of r22189 of /branches/release-0-22-fixes, the jamu.py script included with MythVideo? exits with either sys.exit(True) or sys.exit(False), presumably intended to exit normally or in error, respectively.
However, according to the Python spec at http://docs.python.org/library/sys.html#sys.exit, any non-integer non-None object passed to sys.exit() will result in an error code 1.
This means that the script will always terminate returning error code 1, even when it should be completing successfully. At least by default in Ubuntu, this script is run hourly, which creates a lot of spam to root about a failing script.
Please find attached a patch for jamu.py that changes all sys.exit() calls to use integer arguments.
Patch for jamu.py to use integer exit codes, not booleans