From 027536df0a50686d3e4fa1f5d988eea55c9e3b35 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: May 12 2021 11:56:40 +0000 Subject: kojira: skip unlocking of child locks Related: https://pagure.io/koji/issue/2851 --- diff --git a/util/kojira b/util/kojira index 97a82a6..cce06e3 100755 --- a/util/kojira +++ b/util/kojira @@ -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):