#8389 help() broken for plugins with ipaclient override
Opened 2 years ago by cheimes. Modified 2 years ago


help() on plugins with an override in ipaclient.plugins is broken. The get_plugin_next method is failing with KeyError: <class 'ipaclient.frontend.MethodOverride'>

Steps to Reproduce

  1. ipa console
  2. help(api.Command.user_show)

Actual behavior

>>> help(api.Command.user_show)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib64/python3.8/_sitebuiltins.py", line 103, in __call__
    return pydoc.help(*args, **kwds)
  File "/usr/lib64/python3.8/pydoc.py", line 1907, in __call__
  File "/usr/lib64/python3.8/pydoc.py", line 1966, in help
    else: doc(request, 'Help on %s:', output=self._output)
  File "/usr/lib64/python3.8/pydoc.py", line 1686, in doc
    pager(render_doc(thing, title, forceload))
  File "/usr/lib64/python3.8/pydoc.py", line 1679, in render_doc
    return title % desc + '\n\n' + renderer.document(object, name)
  File "/usr/lib64/python3.8/pydoc.py", line 380, in document
    if inspect.isclass(object): return self.docclass(*args)
  File "/usr/lib64/python3.8/pydoc.py", line 1324, in docclass
    for name, kind, cls, value in classify_class_attrs(object)
  File "/usr/lib64/python3.8/pydoc.py", line 203, in classify_class_attrs
    for (name, kind, cls, value) in inspect.classify_class_attrs(object):
  File "/usr/lib64/python3.8/inspect.py", line 443, in classify_class_attrs
    srch_obj = getattr(srch_cls, name, None)
  File "/usr/lib/python3.8/site-packages/ipalib/util.py", line 1038, in __get__
    return self.fget.__get__(obj, obj_type)()
  File "/usr/lib/python3.8/site-packages/ipaclient/frontend.py", line 142, in __NO_CLI_getter
    return cls.__get_next().NO_CLI
  File "/usr/lib/python3.8/site-packages/ipaclient/frontend.py", line 126, in __get_next
    return api.get_plugin_next(cls)
  File "/usr/lib/python3.8/site-packages/ipalib/plugable.py", line 816, in get_plugin_next
    return self.__next[plugin]
KeyError: <class 'ipaclient.frontend.MethodOverride'>

Expected behavior

No error


package ipa-server is not installed
package ipa-client is not installed

I can reproduce the error with ipa-server-4.8.4-7.module+el8.2.0+6046+aaa49f96.x86_64, too.

Login to comment on this ticket.