Bug 498549 - not providing valid input to ipa user-show throws traceback
Summary: not providing valid input to ipa user-show throws traceback
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: freeIPA
Classification: Retired
Component: ipa-admintools
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 431020
TreeView+ depends on / blocked
 
Reported: 2009-05-01 00:35 UTC by Michael Gregg
Modified: 2015-01-04 23:38 UTC (History)
2 users (show)

Fixed In Version: freeipa-2.0.0-1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-27 07:13:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Michael Gregg 2009-05-01 00:35:44 UTC
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 20:17:55 UTC
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 21:10:41 UTC
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.