Revision d2aff862 lib/locking.py
b/lib/locking.py | ||
---|---|---|
560 | 560 |
shared: is the pre-acquisition shared? |
561 | 561 |
|
562 | 562 |
""" |
563 |
|
|
564 |
assert not self.__lock._is_owned(shared=1), (
|
|
565 |
"Cannot add new elements while sharing the set-lock")
|
|
563 |
# Check we don't already own locks at this level |
|
564 |
assert not self._is_owned() or self.__lock._is_owned(shared=0), \
|
|
565 |
"Cannot add locks if the set is only partially owned, or shared"
|
|
566 | 566 |
|
567 | 567 |
# Support passing in a single resource to add rather than many |
568 | 568 |
if isinstance(names, basestring): |
Also available in: Unified diff