#4099 Uncaught TypeError on otptoken-add --key
Closed: Fixed None Opened 10 years ago by pvoborni.

It fails for key: MZXW6YTBOI====== (base32 encoded string 'foobar') with:

$ ipa otptoken-add fobar --key
Key: 
Enter Key again to verify: 
ipa: ERROR: non-public: TypeError: unbound method _convert_scalar() must be called with Bytes instance as first argument (got str instance instead)
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/ipalib/backend.py", line 129, in execute
    result = self.Command[_name](*args, **options)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 428, in __call__
    params = self.convert(**params)
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 627, in convert
    (k, self.params[k].convert(v)) for (k, v) in kw.iteritems()
  File "/usr/lib/python2.7/site-packages/ipalib/frontend.py", line 627, in <genexpr>
    (k, self.params[k].convert(v)) for (k, v) in kw.iteritems()
  File "/usr/lib/python2.7/site-packages/ipalib/parameters.py", line 786, in convert
    return self._convert_scalar(value)
  File "/usr/lib/python2.7/site-packages/ipalib/plugins/otptoken.py", line 83, in _convert_scalar
    return Bytes._convert_scalar(value, index)
TypeError: unbound method _convert_scalar() must be called with Bytes instance as first argument (got str instance instead)
ipa: ERROR: an internal error has occurred

master:

  • 70e2217 Use super() properly to avoid an exception

Metadata Update from @pvoborni:
- Issue assigned to npmccallum
- Issue set to the milestone: FreeIPA 4.0 - 2014/02

7 years ago

Log in to comment on this ticket.

Metadata