AuthExpire returns code 1 in kojid

Fixes: https://pagure.io/koji/issue/3084
This commit is contained in:
Jana Cupova 2021-11-01 07:22:10 +01:00 committed by Tomas Kopecek
parent f979899e5c
commit 2d820f4b7d

View file

@ -142,6 +142,7 @@ def main(options, session):
tm.restart_pending = True
signal.signal(signal.SIGTERM, shutdown)
signal.signal(signal.SIGUSR1, restart)
exit_code = 0
while True:
try:
taken = False
@ -156,6 +157,7 @@ def main(options, session):
os.execv(sys.argv[0], sys.argv)
except koji.AuthExpired:
logger.error('Session expired')
exit_code = 1
break
except koji.RetryError:
raise
@ -175,7 +177,7 @@ def main(options, session):
logger.warning("Shutting down, please wait...")
tm.shutdown()
session.logout()
sys.exit(0)
sys.exit(exit_code)
class BuildRoot(object):