Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
warn on strict type checks only
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkrug committed Jun 6, 2019
1 parent 48610a3 commit 5999002
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/oic/oauth2/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,15 +370,19 @@ def _add_value(self, skey, vtyp, key, val, _deser, null_allowed):
try:
self._dict[skey] = int(val)
except (ValueError, TypeError):
raise ValueError(
'"{}", wrong type of value for "{}"'.format(val, skey)
)
logger.warn('"{}", wrong type of value for "{}"'.format(val, skey))
pass
#raise ValueError(
# '"{}", wrong type of value for "{}"'.format(val, skey)
#)
else:
return
elif vtyp is bool:
raise ValueError(
'"{}", wrong type of value for "{}"'.format(val, skey)
)
logger.warn('"{}", wrong type of value for "{}"'.format(val, skey))
pass
#raise ValueError(
# '"{}", wrong type of value for "{}"'.format(val, skey)
#)

if isinstance(val, str):
self._dict[skey] = val
Expand Down

0 comments on commit 5999002

Please sign in to comment.