Adds appropriate object checking to 'inside()' lockfunc (partial fix for #2227).
This commit is contained in:
parent
976835eced
commit
e645ccdbb8
1 changed files with 2 additions and 0 deletions
|
|
@ -557,6 +557,8 @@ def inside(accessing_obj, accessed_obj, *args, **kwargs):
|
||||||
want also nested objects to pass the lock, use the `insiderecursive`
|
want also nested objects to pass the lock, use the `insiderecursive`
|
||||||
lockfunc.
|
lockfunc.
|
||||||
"""
|
"""
|
||||||
|
if hasattr(accessed_obj, "obj"):
|
||||||
|
accessed_obj = accessed_obj.obj
|
||||||
return accessing_obj.location == accessed_obj
|
return accessing_obj.location == accessed_obj
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue