Skip to content

Commit d83169d

Browse files
stsnelalanking
authored andcommitted
[#5] Fix missing import in connection.py
1 parent 545997d commit d83169d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

irods/connection.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import errno
99
import irods.password_obfuscation as obf
1010
from irods import MAX_NAME_LEN
11+
from irods.exception import PAM_AUTH_PASSWORD_INVALID_TTL
1112
from ast import literal_eval as safe_eval
1213
import re
1314

@@ -598,11 +599,10 @@ def _login_pam(self):
598599
# Getting the new password
599600
try:
600601
output_message = self.recv()
601-
except irods.exception.PAM_AUTH_PASSWORD_INVALID_TTL as exc:
602-
# TODO (#480): In Python3 will be able to do: 'raise RuntimeError(...) from exc' for more succinct error messages
602+
except PAM_AUTH_PASSWORD_INVALID_TTL as exc:
603603
raise RuntimeError(
604604
"Client-configured TTL is outside server parameters (password min and max times)"
605-
)
605+
) from exc
606606

607607
Pam_Response_Class = (
608608
PamAuthRequestOut if use_dedicated_pam_api else AuthPluginOut

0 commit comments

Comments
 (0)