Skip to content

Commit

Permalink
Linters
Browse files Browse the repository at this point in the history
  • Loading branch information
matveyvarg committed Dec 18, 2023
1 parent 11e5009 commit b9dd392
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deker/locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,22 @@ def check_existing_lock(self, func_args: Sequence, func_kwargs: Dict) -> None:
raise DekerLockError(f"Array {array} is locked with read locks")

def release(self, e: Optional[Exception] = None) -> None:
"""Release Flock.
If array is locked from Varary from current Process, do nothing
:param e: exception that might have been raised
"""
if self.is_locked_with_varray:
return

super().release(e)

def acquire(self, path: Optional[Path]) -> None:
"""Make lock using flock.
If array is locked from Varary from current Process, do nothing
:param path: Path to file that should be flocked
"""
if self.is_locked_with_varray:
return
super().acquire(path)
Expand Down

0 comments on commit b9dd392

Please sign in to comment.