Skip to content

Commit

Permalink
umu: update filelock debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Jul 28, 2024
1 parent a4e7106 commit fce1120
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion umu/umu_proton.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ def _get_latest(
# Use the latest UMU/GE-Proton
try:
lock = FileLock(f"{UMU_LOCAL}/compatibilitytools.d.lock")
log.debug("Acquiring file lock '%s'...", lock.lock_file)
lock.acquire()
log.debug("Acquired lock 'compatibilitytools.d.lock'")

if steam_compat.joinpath(proton).is_dir():
raise FileExistsError
Expand Down Expand Up @@ -365,6 +365,7 @@ def _get_latest(
except FileExistsError:
pass
finally:
log.debug("Released file lock '%s'", lock.lock_file)
lock.release()

os.environ["PROTONPATH"] = str(steam_compat.joinpath(proton))
Expand Down
3 changes: 2 additions & 1 deletion umu/umu_runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,8 @@ def _restore_umu(
lock: FileLock = FileLock(f"{UMU_LOCAL}/umu.lock")

try:
log.debug("Acquiring file lock '%s'...", lock.lock_file)
lock.acquire()
log.debug("Acquired lock 'umu.lock'")

if UMU_LOCAL.joinpath("umu").is_file():
raise FileExistsError
Expand All @@ -441,4 +441,5 @@ def _restore_umu(
except BaseException:
raise
finally:
log.debug("Released file lock '%s'", lock.lock_file)
lock.release()

0 comments on commit fce1120

Please sign in to comment.