#2284 help command fails when pipe is broken
Closed: Fixed None Opened 12 years ago by rcritten.

The help command fails with a traceback when piped into a bad command:

$ ipa help automount|bad
-bash: bad: command not found
ipa: ERROR: non-public: IOError: [Errno 32] Broken pipe
Traceback (most recent call last):
  File "/home/rcrit/redhat/freeipa-test/ipalib/backend.py", line 125, in execute
    result = self.Command[_name](*args, **options)
  File "/home/rcrit/redhat/freeipa-test/ipalib/frontend.py", line 438, in __call__
    ret = self.run(*args, **options)
  File "/home/rcrit/redhat/freeipa-test/ipalib/cli.py", line 755, in run
    self.print_commands(name)
  File "/home/rcrit/redhat/freeipa-test/ipalib/cli.py", line 825, in print_commands
    print '  %s  %s' % (to_cli(c.name).ljust(mcl), c.summary)
IOError: [Errno 32] Broken pipe
ipa: ERROR: an internal error has occurred

master:

  • b98077e Do not print traceback when pipe is broken

Metadata Update from @rcritten:
- Issue assigned to rcritten
- Issue set to the milestone: FreeIPA 4.2

7 years ago

Login to comment on this ticket.

Metadata