exit codes for kojivmd
This commit is contained in:
parent
e080e11e0a
commit
dbdeaec923
1 changed files with 7 additions and 1 deletions
|
|
@ -252,6 +252,7 @@ def main(options, session):
|
|||
tm.restart_pending = True
|
||||
signal.signal(signal.SIGTERM, shutdown)
|
||||
signal.signal(signal.SIGUSR1, restart)
|
||||
exit_code = 0
|
||||
taken = False
|
||||
tm.cleanupAllVMs()
|
||||
while True:
|
||||
|
|
@ -270,6 +271,11 @@ def main(options, session):
|
|||
raise
|
||||
except koji.AuthExpired:
|
||||
logger.error('Session expired')
|
||||
exit_code = 1
|
||||
break
|
||||
except koji.AuthError:
|
||||
logger.error('Authentication error')
|
||||
exit_code = 1
|
||||
break
|
||||
except Exception:
|
||||
# XXX - this is a little extreme
|
||||
|
|
@ -287,7 +293,7 @@ def main(options, session):
|
|||
logger.warning("Shutting down, please wait...")
|
||||
tm.shutdown()
|
||||
session.logout()
|
||||
sys.exit(0)
|
||||
sys.exit(exit_code)
|
||||
|
||||
|
||||
####################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue