Bug 720591 - Some bkr commands always exit with status 0
Summary: Some bkr commands always exit with status 0
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.6
Hardware: Unspecified
OS: Unspecified
low
unspecified vote
Target Milestone: ---
Assignee: Dan Callaghan
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-12 07:48 UTC by Dan Callaghan
Modified: 2019-05-22 13:40 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-12 02:43:50 UTC


Attachments (Terms of Use)

Description Dan Callaghan 2011-07-12 07:48:28 UTC
These are the ones I've noticed:

* distros-edit-version
* job-cancel
* task-add

It might be worth checking each of the bkr commands and making sure their exit status is always sensible and indicative of errors.

Comment 1 Dan Callaghan 2011-07-25 05:31:15 UTC
This snippet from kobo.cli.CommandOptionParser is problematic:

    def run(self, args=None, values=None):
        """parse arguments and run a command"""
        cmd, cmd_opts, cmd_args = self.parse_args(args, values)
        cmd_kwargs = cmd_opts.__dict__
        try:
            cmd.run(*cmd_args, **cmd_kwargs)
        except Fault, ex:
            print "Exception: %s" % ex.faultString
        except Exception, ex:
            raise
            print "Exception: %s" % ex

This is the method we eventually call to do all the work when bkr is invoked. So whenever we get an XMLRPC fault, the error is printed to stdout and then discarded, leaving us with an exit status of 0.


Note You need to log in before you can comment on or make changes to this bug.