Skip to content

Commit 18e705d

Browse files
committed
[_518] do not subst pam login errors with new RuntimeError
1 parent 507b034 commit 18e705d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

irods/connection.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -472,15 +472,13 @@ def _login_pam(self):
472472
# Login using PAM password from .irodsA
473473
try:
474474
self._login_native()
475-
except (ex.CAT_PASSWORD_EXPIRED, ex.CAT_INVALID_USER, ex.CAT_INVALID_AUTHENTICATION):
475+
except (ex.CAT_PASSWORD_EXPIRED, ex.CAT_INVALID_USER, ex.CAT_INVALID_AUTHENTICATION) as exc:
476476
time_to_live_in_hours = cfg.legacy_auth.pam.time_to_live_in_hours
477477
if cfg.legacy_auth.pam.password_for_auto_renew:
478478
new_pam_password = cfg.legacy_auth.pam.password_for_auto_renew
479479
# Fall through and retry the native login later, after creating a new PAM password
480480
else:
481-
message = ('Time To Live has expired for the PAM password, and no new password is given in ' +
482-
'legacy_auth.pam.password_for_auto_renew. Please run iinit.')
483-
raise RuntimeError(message)
481+
raise exc
484482
else:
485483
# Login succeeded, so we're within the time-to-live and can return without error.
486484
return

0 commit comments

Comments
 (0)