#6115 ipa command provides stack trace when provided with single hypen commands
Opened 3 years ago by mbasti. Modified 2 years ago

Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 7): Bug 1357495

Description of problem:
If user provides commands such as following, then ipa command provides stack
trace instead of error message to user.


# ipa -verbose
Traceback (most recent call last):
  File "/usr/bin/ipa", line 32, in <module>
    cli.run(api)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1346, in run
    api.log.exception('%s: %s', e.__class__.__name__, str(e))
AttributeError: 'API' object has no attribute 'log'

# ipa -ver
Traceback (most recent call last):
  File "/usr/bin/ipa", line 32, in <module>
    cli.run(api)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1346, in run
    api.log.exception('%s: %s', e.__class__.__name__, str(e))
AttributeError: 'API' object has no attribute 'log'

# ipa -e aa
Traceback (most recent call last):
  File "/usr/bin/ipa", line 32, in <module>
    cli.run(api)
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1346, in run
    api.log.exception('%s: %s', e.__class__.__name__, str(e))
AttributeError: 'API' object has no attribute 'log'


Version-Release number of selected component (if applicable):
ipa-server-4.2.0-15.el7_2.17.x86_64

How reproducible:
100%

Steps to Reproduce:
1. ipa -verbose # or
2. ipa -e aa # or
3. ipa -ver

Actual results:
IPA command provides stack traces

Expected results:
IPA command should provide user friendly information about unknown command

Metadata Update from @mbasti:
- Issue assigned to someone
- Issue set to the milestone: FreeIPA 4.5 backlog

2 years ago

Login to comment on this ticket.

Metadata