#8898 plugin `plugins` doesn't work
Closed: fixed by abbra. Opened by slev.

[root@master1 /]# ipa plugins
ipa: ERROR: non-public: AttributeError: 'str' object has no attribute 'decode'
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/ipalib/backend.py", line 141, in execute
    return self.Command[_name](*args, **options)
  File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 471, in __call__
    return self.__do_call(*args, **options)
  File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 499, in __do_call
    ret = self.run(*args, **options)
  File "/usr/lib/python3.9/site-packages/ipalib/frontend.py", line 1214, in run
    return self.execute(*args, **options)
  File "/usr/lib/python3.9/site-packages/ipalib/misc.py", line 128, in execute
    result.setdefault(key, []).append(namespace.decode('utf-8'))
AttributeError: 'str' object has no attribute 'decode'
ipa: ERROR: an internal error has occurred

Metadata Update from @slev:
- Issue assigned to slev

It seems this doesn't work since b3c41f21e5.
I can reproduce this on ipa-4-8 and ipa-4-9. I didn't check ipa-4-6.

PR:
https://github.com/freeipa/freeipa/pull/5857

master:

  • cf80244375851dff01aaab467f7f24f555d6d778 plugins: Don't treat keys of api as bytes
  • cc212e552fc61b5fedb83e6cbc81a958ada138b8 ipatests: Add tests for plugins plugin
  • fe8635941634f21448123779a41e4d21827a99c9 ipatests: Add tests for env plugin

ipa-4-9:

  • 32eb409cf6c4bf03d4ae3451001c81d175310a7c plugins: Don't treat keys of api as bytes
  • 15d710247d389e992844637fdb8a35610b595ba2 ipatests: Add tests for plugins plugin
  • 0abae79183207a4bdc7a6147eb143319806ad567 ipatests: Add tests for env plugin

Metadata Update from @abbra:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

ipa-4-8:

  • d59a2e5c46e90969d2f59a3f9a8374e551d6dd05 plugins: Don't treat keys of api as bytes
  • c55bc46ac5b063c5b6660838976b66c7b6280a5d ipatests: Add tests for plugins plugin
  • 9a2fe470cc4b9d6814e9f02c83f45ba3072ba786 ipatests: Add tests for env plugin
Metadata