Skip to content

Commit 5c04629

Browse files
committed
Fix for older requests versions (<2.12.2)
1 parent 0732a31 commit 5c04629

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

minfraud/webservice.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ def __init__(self,
4343
"""
4444
# pylint: disable=too-many-arguments
4545
self._locales = locales
46-
# requests 2.12.2 requires that the username passed to auth be bytes
47-
# or a string, with the former being preferred.
48-
self._user_id = str(user_id).encode()
46+
# requests 2.12.2 requires that the username passed to auth be a
47+
# string
48+
self._user_id = str(user_id)
4949
self._license_key = license_key
5050
self._base_uri = u'https://{0:s}/minfraud/v2.0'.format(host)
5151
self._timeout = timeout

0 commit comments

Comments
 (0)