kojira: skip unlocking of child locks

Related: https://pagure.io/koji/issue/2851
This commit is contained in:
Tomas Kopecek 2021-05-12 13:54:47 +02:00
parent 7d3f34b476
commit 3849e07ecf

View file

@ -309,10 +309,19 @@ class LoggingLockManager(object):
lock.acquire()
def release_locks(self):
# Only parent process should have locked locks in 3.9+, child ones will
# be reinitilized to free state
# In older pythons, state could be random (and no module_lock)
if self.module_lock:
logging._releaseLock()
try:
logging._releaseLock()
except RuntimeError:
pass
for lock in self.locks:
lock.release()
try:
lock.release()
except RuntimeError:
pass
class RepoManager(object):