PR#3364: Catch koji.AuthError and bail out

Merges #3364
https://pagure.io/koji/pull-request/3364

Related #3376
https://pagure.io/koji/issue/3376
This commit is contained in:
Tomas Kopecek 2022-08-17 10:49:48 +02:00
commit 3cf8cc50ed
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