mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-27 04:20:22 +08:00
Fix readonly lock logic.
This commit is contained in:
parent
99e6d35808
commit
c8ef47b03b
@ -99,10 +99,8 @@ class _Selection(DOMWidget):
|
||||
self.value = next(iter(self.values_values))
|
||||
|
||||
def _values_readonly_changed(self, name, old, new):
|
||||
if not self.values_lock.acquire(False):
|
||||
if not self.values_lock.locked():
|
||||
raise TraitError("`.%s` is a read-only trait. Use the `.values` tuple instead." % name)
|
||||
else:
|
||||
self.values_lock.release()
|
||||
|
||||
def _value_changed(self, name, old, new):
|
||||
"""Called when value has been changed"""
|
||||
|
Loading…
Reference in New Issue
Block a user