Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 408deec

Browse files
committed
change sync helper to be py26 friendly
1 parent a7a3d54 commit 408deec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java2python/mod/include/sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def lock_for_object(obj, locks={}):
55
return locks.setdefault(id(obj), RLock())
66

77
def synchronized(call):
8-
assert call.__code__.co_varnames[0] in {'self', 'cls'}
8+
assert call.__code__.co_varnames[0] in ['self', 'cls']
99
@wraps(call)
1010
def inner(*args, **kwds):
1111
with lock_for_object(args[0]):

0 commit comments

Comments
 (0)