Make sure to strip key/value of whitespace in lockfunc kwargs. Resolves #2150

This commit is contained in:
Griatch 2020-06-28 17:09:41 +02:00
parent a1014089d3
commit a3edbca209

View file

@ -236,7 +236,7 @@ class LockHandler(object):
elist.append(_("Lock: lock-function '%s' is not available.") % funcstring)
continue
args = list(arg.strip() for arg in rest.split(",") if arg and "=" not in arg)
kwargs = dict([arg.split("=", 1) for arg in rest.split(",") if arg and "=" in arg])
kwargs = dict([(part.strip() for part in arg.split("=", 1)) for arg in rest.split(",") if arg and "=" in arg])
lock_funcs.append((func, args, kwargs))
evalstring = evalstring.replace(funcstring, "%s")
if len(lock_funcs) < nfuncs: