Commit 0a682ec1 by Oleksandr Barabash

AttributeError exceptino added to b64decode_str_safe and b64encode_str_safe

parent 92dfe349
......@@ -72,7 +72,7 @@ def b64decode_str_safe(data: str, encoding="utf-8",
""" Safe b64decode_str """
try:
return b64decode_str(data, encoding)
except (TypeError, binascii.Error):
except (TypeError, binascii.Error, AttributeError):
return default
......@@ -81,7 +81,7 @@ def b64encode_str_safe(data: str, encoding="utf-8",
""" Safe b64decode_str """
try:
return b64encode_str(data, encoding)
except (TypeError, binascii.Error):
except (TypeError, binascii.Error, AttributeError):
return default
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment