avoid masking AuthError details
All checks were successful
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (pull_request) Successful in 1m17s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 1m0s
/ flake8 (pull_request) Successful in 17s
/ bandit (pull_request) Successful in 20s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 1m12s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (pull_request) Successful in 1m54s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (pull_request) Successful in 2m41s
All checks were successful
/ tests (fedora-43@sha256:cf1ef55da0d7dd9251b79263c4d1e2350d4291fcd6dc54a1e751d3fe2cf4614d) (pull_request) Successful in 1m17s
/ tests (fedora-rawhide@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 1m0s
/ flake8 (pull_request) Successful in 17s
/ bandit (pull_request) Successful in 20s
/ tests (fedora-44@sha256:5e1187ee4536674e08961cbe6b1b84dfc9df15a513dee328365909be5a0d5ed8) (pull_request) Successful in 1m12s
/ tests (centos-10@sha256:1f53b2b040e449b0cfce526f1a221e6dbd6648506270220ea333728a6b52a90b) (pull_request) Successful in 1m54s
/ tests (centos-9@sha256:c5fe30a62d4b62b46acdf764bf1f7293e9fa4287972ec6a86ccb43209646dc32) (pull_request) Successful in 2m41s
Fixes koji/koji#4607
This commit is contained in:
parent
ab11f28684
commit
43b421f1a5
3 changed files with 10 additions and 10 deletions
|
|
@ -173,8 +173,8 @@ def main(options, session):
|
|||
break
|
||||
except koji.RetryError:
|
||||
raise
|
||||
except koji.AuthError:
|
||||
logger.error('Authentication error')
|
||||
except koji.AuthError as e:
|
||||
logger.error('Authentication error: %s', e)
|
||||
exit_code = 1
|
||||
break
|
||||
except Exception:
|
||||
|
|
@ -6961,8 +6961,8 @@ if __name__ == "__main__":
|
|||
try:
|
||||
# authenticate using user/password
|
||||
glob_session.login()
|
||||
except koji.AuthError:
|
||||
quit("Error: Unable to log in. Bad credentials?")
|
||||
except koji.AuthError as e:
|
||||
quit("Error: Unable to log in: %s" % e)
|
||||
except requests.exceptions.ConnectionError:
|
||||
quit("Error: Unable to connect to server %s" % (options.server))
|
||||
elif reqgssapi:
|
||||
|
|
|
|||
|
|
@ -696,8 +696,8 @@ def main(options, session):
|
|||
logger.warning("Session expired")
|
||||
exit_code = 1
|
||||
break
|
||||
except koji.AuthError:
|
||||
logger.warning("Authentication error")
|
||||
except koji.AuthError as e:
|
||||
logger.warning("Authentication error: %s", e)
|
||||
exit_code = 1
|
||||
break
|
||||
except SystemExit:
|
||||
|
|
|
|||
|
|
@ -274,8 +274,8 @@ def main(options, session):
|
|||
logger.error('Session expired')
|
||||
exit_code = 1
|
||||
break
|
||||
except koji.AuthError:
|
||||
logger.error('Authentication error')
|
||||
except koji.AuthError as e:
|
||||
logger.error('Authentication error: %s', e)
|
||||
exit_code = 1
|
||||
break
|
||||
except Exception:
|
||||
|
|
@ -1203,8 +1203,8 @@ if __name__ == "__main__":
|
|||
try:
|
||||
# authenticate using user/password
|
||||
session.login()
|
||||
except koji.AuthError:
|
||||
quit("Error: Unable to log in. Bad credentials?")
|
||||
except koji.AuthError as e:
|
||||
quit("Error: Unable to log in: %s" % e)
|
||||
except requests.exceptions.ConnectionError:
|
||||
quit("Error: Unable to connect to server %s" % (options.server))
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue