Add search-object functionality to olc menu

This commit is contained in:
Griatch 2018-07-28 18:26:00 +02:00
parent 69ae055e20
commit e5f63f8431
4 changed files with 266 additions and 66 deletions

View file

@ -1055,7 +1055,10 @@ def list_node(option_generator, select=None, pagesize=10):
else:
if callable(select):
try:
return select(caller, selection)
if bool(getargspec(select).keywords):
return select(caller, selection, available_choices=available_choices)
else:
return select(caller, selection)
except Exception:
logger.log_trace()
elif select:
@ -1124,7 +1127,7 @@ def list_node(option_generator, select=None, pagesize=10):
except Exception:
logger.log_trace()
else:
if isinstance(decorated_options, {}):
if isinstance(decorated_options, dict):
decorated_options = [decorated_options]
else:
decorated_options = make_iter(decorated_options)