AuthExpire returns code 1 in kojid
Fixes: https://pagure.io/koji/issue/3084
This commit is contained in:
parent
f979899e5c
commit
2d820f4b7d
1 changed files with 3 additions and 1 deletions
|
|
@ -142,6 +142,7 @@ def main(options, session):
|
||||||
tm.restart_pending = True
|
tm.restart_pending = True
|
||||||
signal.signal(signal.SIGTERM, shutdown)
|
signal.signal(signal.SIGTERM, shutdown)
|
||||||
signal.signal(signal.SIGUSR1, restart)
|
signal.signal(signal.SIGUSR1, restart)
|
||||||
|
exit_code = 0
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
taken = False
|
taken = False
|
||||||
|
|
@ -156,6 +157,7 @@ def main(options, session):
|
||||||
os.execv(sys.argv[0], sys.argv)
|
os.execv(sys.argv[0], sys.argv)
|
||||||
except koji.AuthExpired:
|
except koji.AuthExpired:
|
||||||
logger.error('Session expired')
|
logger.error('Session expired')
|
||||||
|
exit_code = 1
|
||||||
break
|
break
|
||||||
except koji.RetryError:
|
except koji.RetryError:
|
||||||
raise
|
raise
|
||||||
|
|
@ -175,7 +177,7 @@ def main(options, session):
|
||||||
logger.warning("Shutting down, please wait...")
|
logger.warning("Shutting down, please wait...")
|
||||||
tm.shutdown()
|
tm.shutdown()
|
||||||
session.logout()
|
session.logout()
|
||||||
sys.exit(0)
|
sys.exit(exit_code)
|
||||||
|
|
||||||
|
|
||||||
class BuildRoot(object):
|
class BuildRoot(object):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue