Skip to content

Commit

Permalink
use lock method
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Aug 28, 2023
1 parent b0a8c3c commit 210325a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/omero/hdfstorageV2.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ def addOrThrow(self, hdfpath, hdfstorage, read_only=False):
fileno = hdffile.fileno()
if not read_only:
try:
portalocker.Lock(
hdfpath, flags=(portalocker.LOCK_NB | portalocker.LOCK_EX))
portalocker.lock(
hdffile, flags=(portalocker.LOCK_NB | portalocker.LOCK_EX))
except portalocker.LockException:
hdffile.close()
raise omero.LockTimeout(
Expand Down

0 comments on commit 210325a

Please sign in to comment.