Opened 11 years ago

Closed 11 years ago

#7560 closed patch (fixed)

jamu.py always exits with error 1

Reported by: james@… 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.

Attachments (1)

jamu-exit-codes.patch (15.6 KB) - added by james@… 11 years ago.
Patch for jamu.py to use integer exit codes, not booleans

Download all attachments as: .zip

Change History (3)

Changed 11 years ago by james@…

Attachment: jamu-exit-codes.patch added

Patch for jamu.py to use integer exit codes, not booleans

comment:1 Changed 11 years ago by robertm

(In [22820]) Refs #7560. Return proper exit codes for Jamu.

comment:2 Changed 11 years ago by robertm

Resolution: fixed
Status: newclosed

(In [22821]) Closes #7560. Backport return of proper exit codes for Jamu.

Note: See TracTickets for help on using tickets.