Catch koji.AuthError and bail out

This commit is contained in:
Alex Iribarren 2022-05-18 10:49:39 +02:00 committed by Tomas Kopecek
parent 9d99bbec68
commit 8113448282
2 changed files with 7 additions and 0 deletions

View file

@ -159,6 +159,10 @@ def main(options, session):
logger.error('Session expired')
exit_code = 1
break
except koji.AuthError:
logger.error('Authentication error')
exit_code = 1
break
except koji.RetryError:
raise
except Exception:

View file

@ -1159,6 +1159,9 @@ def main(options, session):
except koji.AuthExpired:
logger.warning("Session expired")
break
except koji.AuthError:
logger.warning("Authentication error")
break
except SystemExit:
logger.warning("Shutting down")
break