Bug 498549 - not providing valid input to ipa user-show throws traceback
not providing valid input to ipa user-show throws traceback
Status: CLOSED ERRATA
Product: freeIPA
Classification: Community
Component: ipa-admintools (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Rob Crittenden
Chandrasekar Kannan
:
Depends On:
Blocks: 431020
  Show dependency treegraph
 
Reported: 2009-04-30 20:35 EDT by Michael Gregg
Modified: 2015-01-04 18:38 EST (History)
2 users (show)

See Also:
Fixed In Version: freeipa-2.0.0-1.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-03-27 03:13:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Gregg 2009-04-30 20:35:44 EDT
Description of problem:
providing bad input to ipa user-show throws a traceback.
Bad cli input is pretty common. 

Version-Release number of selected component (if applicable):
ipa-server-2.0-2.20090428.el5ipa

How reproducible:
always

Steps to Reproduce:
1. ipa user-show --allsu
  
Actual results:
ipa user-show --allsu
usage: Usage: ipa [global-options] user-show USER

ipa: error: no such option: --allsu
ipa: ERROR: SystemExit: 2
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/ipalib/cli.py", line 672, in run
    api.Backend.cli.run(argv)
  File "/usr/lib/python2.4/site-packages/ipalib/cli.py", line 556, in run
    kw = self.parse(cmd, argv)
  File "/usr/lib/python2.4/site-packages/ipalib/cli.py", line 569, in parse
    (collector, args) = parser.parse_args(argv, Collector())
  File "/usr/lib/python2.4/optparse.py", line 1277, in parse_args
    self.error(err.msg)
  File "/usr/lib/python2.4/optparse.py", line 1459, in error
    self.exit(2, "%s: error: %s\n" % (self.get_prog_name(), msg))
  File "/usr/lib/python2.4/optparse.py", line 1449, in exit
    sys.exit(status)
SystemExit: 2
ipa: ERROR: an internal error has occured


Expected results:
No traceback. 
Possibly a message like "no username specified"
Comment 1 Rob Crittenden 2009-05-04 16:17:55 EDT
I think this is resolved by the same fix for bug 498088. Can you retest with a newer build?
Comment 2 Michael Gregg 2009-05-04 17:10:41 EDT
Seems to be behaving correctly now:

[root@iparhel5-vma ~]# ipa user-show --allsu
usage: Usage: ipa [global-options] user-show USER

ipa: error: no such option: --allsu
[root@iparhel5-vma ~]# 

verified against:
[root@iparhel5-vma ~]# rpm -qa ipa-server
ipa-server-2.0-2.20090504.el5ipa

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