Skip to content

Commit 2b96116

Browse files
committed
bytes username do not work with requests < 2.12.2
1 parent 62a9394 commit 2b96116

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

geoip2/webservice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def __init__(self,
9595
self._locales = locales
9696
# requests 2.12.2 requires that the username passed to auth be bytes
9797
# or a string, with the former being preferred.
98-
self._user_id = str(user_id).encode()
98+
self._user_id = str(user_id)
9999
self._license_key = license_key
100100
self._base_uri = 'https://%s/geoip/v2.1' % host
101101
self._timeout = timeout

0 commit comments

Comments
 (0)