Skip to content

Commit 4fdbd3b

Browse files
committed
raise CheckError instead of FatalError from severity >= 4
1 parent 9d75552 commit 4fdbd3b

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

src/idp_test/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from saml2.mdstore import MetadataStore, ToOld
1717
from saml2.mdstore import MetaData
1818

19-
from saml2test import FatalError, OperationError
19+
from saml2test import CheckError, FatalError
2020
from saml2test import exception_trace
2121
from saml2test import ContextFilter
2222

@@ -318,7 +318,7 @@ def run(self):
318318
self.test_log = conv.test_output
319319
tsum = self.test_summation(self.args.oper)
320320
err = None
321-
except OperationError, err:
321+
except CheckError, err:
322322
self.test_log = conv.test_output
323323
tsum = self.test_summation(self.args.oper)
324324
except FatalError, err:

src/idp_test/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from saml2.s_utils import rndstr
1414

1515
from saml2test import tool
16-
from saml2test import FatalError
16+
from saml2test import CheckError, FatalError
1717
from saml2test.interaction import InteractionNeeded
1818

1919
try:
@@ -248,6 +248,8 @@ def handle_result(self):
248248
raise
249249
except ElementTree.ParseError:
250250
return False
251+
except CheckError:
252+
raise
251253
except Exception, err:
252254
if _resp:
253255
logger.info("Faulty response: %s" % _resp)

src/saml2test/tool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
from urlparse import parse_qs
66

77
from saml2test.opfunc import Operation
8-
from saml2test import FatalError
8+
from saml2test import CheckError, FatalError
99
from saml2test.check import ExpectedError, ERROR
10-
from saml2test.check import INTERACTION
1110
from saml2test.interaction import Interaction
1211
from saml2test.interaction import Action
1312
from saml2test.interaction import InteractionNeeded
1413
from saml2test.status import STATUSCODE
14+
from saml2test.status import INTERACTION
1515
from saml2test import OperationError
1616

1717
__author__ = 'rolandh'
@@ -61,7 +61,7 @@ def check_severity(self, stat):
6161
except KeyError:
6262
pass
6363

64-
raise FatalError
64+
raise CheckError
6565

6666
def do_check(self, test, **kwargs):
6767
if isinstance(test, basestring):

0 commit comments

Comments
 (0)