Skip to content

Commit 9c0aa53

Browse files
committed
drop use of strtobool
1 parent 2dc11ca commit 9c0aa53

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/satosa/frontends/saml2.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import json
77
import logging
88
from urllib.parse import urlparse
9-
from distutils.util import strtobool
109

1110
from saml2 import SAMLError, xmldsig
1211
from saml2.config import IdPConfig
@@ -291,15 +290,15 @@ def _handle_authn_response(self, context, internal_response, idp):
291290
# assume saml2int defaults: sign response but not the assertion & allow override
292291
sign_assertion = False
293292
try:
294-
sign_assertion = strtobool(self.config['idp_config']['service']['idp']['policy']['default']['sign_assertion'])
295-
sign_assertion = strtobool(self.config['idp_config']['service']['idp']['policy'][resp_args['sp_entity_id']]['sign_assertion'])
293+
sign_assertion = self.config['idp_config']['service']['idp']['policy']['default']['sign_assertion']
294+
sign_assertion = self.config['idp_config']['service']['idp']['policy'][resp_args['sp_entity_id']]['sign_assertion']
296295
except (KeyError, AttributeError, ValueError):
297296
pass
298297

299298
sign_response = True
300299
try:
301-
sign_response = strtobool(self.config['idp_config']['service']['idp']['policy']['default']['sign_response'])
302-
sign_response = strtobool(self.config['idp_config']['service']['idp']['policy'][resp_args['sp_entity_id']]['sign_response'])
300+
sign_response = self.config['idp_config']['service']['idp']['policy']['default']['sign_response']
301+
sign_response = self.config['idp_config']['service']['idp']['policy'][resp_args['sp_entity_id']]['sign_response']
303302
except (KeyError, AttributeError, ValueError):
304303
pass
305304

0 commit comments

Comments
 (0)