1
0
Fork 0
mirror of synced 2024-06-02 02:34:40 +12:00

Lgndr: Log that the data lock is active

This commit is contained in:
loathingKernel 2023-12-10 22:46:02 +02:00
parent 0503cb1bb4
commit ca5daab71d
No known key found for this signature in database
GPG key ID: CE0C72D0B53821FD
2 changed files with 6 additions and 0 deletions

View file

@ -43,6 +43,9 @@ class LegendaryCLI(LegendaryCLIReal):
def unlock_installed(func):
@functools.wraps(func)
def unlock(self, *args, **kwargs):
if not self.core.lgd.lock_installed():
self.logger.debug("Data is locked, trying to forcufully release it")
# self.core.lgd._installed_lock.release(force=True)
try:
ret = func(self, *args, **kwargs)
except Exception as e:

View file

@ -34,6 +34,9 @@ class LegendaryCore(LegendaryCoreReal):
def unlock_installed(func):
@functools.wraps(func)
def unlock(self, *args, **kwargs):
if not self.lgd.lock_installed():
self.log.debug("Data is locked, trying to forcufully release it")
# self.lgd._installed_lock.release(force=True)
try:
ret = func(self, *args, **kwargs)
except Exception as e: