Merge changes from master
This commit is contained in:
commit
94cf728081
24 changed files with 324 additions and 244 deletions
|
|
@ -539,7 +539,9 @@ def objtag(accessing_obj, accessed_obj, *args, **kwargs):
|
|||
Only true if accessed_obj has the specified tag and optional
|
||||
category.
|
||||
"""
|
||||
return bool(accessed_obj.tags.get(*args))
|
||||
tagkey = args[0] if args else None
|
||||
category = args[1] if len(args) > 1 else None
|
||||
return bool(accessed_obj.tags.get(tagkey, category=category))
|
||||
|
||||
|
||||
def inside(accessing_obj, accessed_obj, *args, **kwargs):
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue