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:
commit
3cf8cc50ed
2 changed files with 7 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue