use rlock so blocking can be passed in py2

This commit is contained in:
Daniel Wallace 2018-08-30 11:42:27 -05:00 committed by rallytime
parent d346b42332
commit de98be6093
No known key found for this signature in database
GPG Key ID: E8F1A4B90D0DEA19

View File

@ -112,7 +112,7 @@ def minion_process():
def handle_hup(manager, sig, frame):
manager.minion.reload()
lock = threading.Lock()
lock = threading.RLock()
def suicide_when_without_parent(parent_pid):
'''
@ -156,7 +156,7 @@ def minion_process():
log.info('waiting random_reauth_delay %ss', delay)
time.sleep(delay)
sys.exit(salt.defaults.exitcodes.SALT_KEEPALIVE)
except SystemExit:
except BaseException:
lock.acquire(blocking=True)
raise