Open Esperk opened 4 years ago
Fixes the following error when running with python3: TypeError: a bytes-like object is required, not 'str'
TypeError: a bytes-like object is required, not 'str'
This change changes nothing in python2 but casts to a bytestring in python3 which enables casting to a base64 string in both versions.
I'm not sure if this is a known issue but the flake8 tests seem to fail on untouched code.
Looks like this is also an issue on https://github.com/LPgenerator/django-db-mailer/pull/122
Fixes the following error when running with python3:
TypeError: a bytes-like object is required, not 'str'
This change changes nothing in python2 but casts to a bytestring in python3 which enables casting to a base64 string in both versions.