List lockfuncs in menu, more elaborate doc strings

This commit is contained in:
Griatch 2018-07-24 20:48:54 +02:00
parent 38ebfb47b1
commit 4f72f0ccbb
2 changed files with 284 additions and 56 deletions

View file

@ -663,6 +663,19 @@ def validate_lockstring(lockstring):
return _LOCK_HANDLER.validate(lockstring)
def get_all_lockfuncs():
"""
Get a dict of available lock funcs.
Returns:
lockfuncs (dict): Mapping {lockfuncname:func}.
"""
if not _LOCKFUNCS:
_cache_lockfuncs()
return _LOCKFUNCS
def _test():
# testing