Skip to content

Commit

Permalink
Merge pull request #2 from fafhrd91/master
Browse files Browse the repository at this point in the history
Check if context is not joined to zodb connection for transaction where lock is added.
  • Loading branch information
lrowe committed Nov 30, 2011
2 parents 195d636 + a02265f commit ac3c7a2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plone/locking/lockable.py
Expand Up @@ -119,7 +119,11 @@ def stealable(self, lock_type=STEALABLE_LOCK):
def lock_info(self):
info = []
rtokens = dict([(v['token'], v['type']) for v in self._locks(False).values()])
isReadOnly = self.context._p_jar.isReadOnly()
jar = self.context._p_jar
if jar is not None:
isReadOnly = jar.isReadOnly()
else:
isReadOnly = False
for lock in self.context.wl_lockValues(not isReadOnly):
if not lock.isValid():
continue # Skip invalid/expired locks
Expand Down

0 comments on commit ac3c7a2

Please sign in to comment.