#6081 ipa otptoken-add --type=totp gives internal error
Closed: Fixed None Opened 7 years ago by pvoborni.

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

Description of problem:
ipa otptoken-add --type=totp gives internal error

Version-Release number of selected component (if applicable):
ipa-server-4.4.0-1.el7.x86_64

How reproducible:
100%

# ipa otptoken-add --type=totp
ipa: ERROR: AttributeError: 'ResultFormattingError' object has no attribute
'type'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1350, in run
    sys.exit(api.Backend.cli.run(argv))
  File "/usr/lib/python2.7/site-packages/ipalib/cli.py", line 1115, in run
    rv = cmd.output_for_cli(self.api.Backend.textui, result, *args, **options)
  File "/usr/lib/python2.7/site-packages/ipaclient/plugins/otptoken.py", line
103, in output_for_cli
    qr = self._get_qrcode(output, uri, options['version'])
  File "/usr/lib/python2.7/site-packages/ipaclient/plugins/otptoken.py", line
83, in _get_qrcode
    "QR code width is greater than that of the output "
  File "/usr/lib/python2.7/site-packages/ipalib/messages.py", line 48, in
add_message
    result.setdefault('messages', []).append(message.to_dict())
  File "/usr/lib/python2.7/site-packages/ipalib/messages.py", line 125, in
to_dict
    type=unicode(self.type),
AttributeError: 'ResultFormattingError' object has no attribute 'type'
ipa: ERROR: an internal error has occurred


Expected results:


Additional info:

master:

  • a5c8c98 messages: specify message type for ResultFormattingError

Metadata Update from @pvoborni:
- Issue assigned to mbabinsk
- Issue set to the milestone: FreeIPA 4.4.1

7 years ago

Login to comment on this ticket.

Metadata