New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI commands does not return code '1' for the failures #1485
Comments
Comment from mharmsen (@mharmsen) at 2014-03-24 20:39:31 Per CS/DS Meeting on 3/24/2014 - cleanup component. |
Comment from mharmsen (@mharmsen) at 2014-04-07 20:48:16 Per request from QE at the CS/DS meeting of 4/7/2014, it was determined that this ticket's priority would be raised to 'critical'. |
Comment from aakkiang (@aakkiang) at 2014-04-09 20:15:11 Tested workaround that mharmsen suggested, in /usr/bin/pki change 'subprocess.call(command)' to 'subprocess.check_call(command)', now its returning code '1' for the failures; but help tests where a code '0' is expected is returning a code '1'.
|
Comment from mrniranjan (@mrniranjan) at 2014-05-02 14:19:19 with below versions the return code for failed pki commands are returning 255 instead of 1
|
Comment from mharmsen (@mharmsen) at 2014-05-02 22:58:20 Replying to [comment:7 mrniranjan]:
This is by design -- in the previous iteration of this bug, all error codes from the various java-based CLI tools were set to return "-1" on error and "0" on success. The python-based "pki" program simply returns the value returned by its java-based CLI tool. Consequently, if your test scripts are failing, they should only be testing for non-zero based return values (i. e. - [rv != 0]) rather than specific return values such as "-1", "1", "255", etc. However, if there are cases where any CLI man page is specifically stating an error code return value of "1", this does need to be changed. Closing as WONT FIX. |
Comment from aakkiang (@aakkiang) at 2017-02-27 14:02:38 Metadata Update from @aakkiang:
|
This issue was migrated from Pagure Issue #918. Originally filed by aakkiang (@aakkiang) on 2014-03-19 20:29:04:
CLI commands returns a '0' instead of '1' for the failures.
The text was updated successfully, but these errors were encountered: