Skip to content
Snippets Groups Projects
Commit 759a9ae3 authored by Antoine Millet's avatar Antoine Millet
Browse files

Handle duplicated locks in Acquires class constructor.

parent 2ab589f7
No related branches found
No related tags found
No related merge requests found
......@@ -27,7 +27,7 @@ class Acquires(object):
'''
def __init__(self, *locks):
self._locks = sorted(locks, key=lambda x: id(x))
self._locks = sorted(set(locks), key=lambda x: id(x))
def __enter__(self):
for lock in self._locks:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment