Skip to content

Commit bb66715

Browse files
authored
Fix python3 compatibility issue when using an authenticated proxy
1 parent 6dbf1ae commit bb66715

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dyn/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,9 @@ def connect(self):
185185
use_proxy = True
186186

187187
if self.proxy_user and self.proxy_pass:
188-
auth = '{}:{}'.format(self.proxy_user, self.proxy_pass)
189-
headers['Proxy-Authorization'] = 'Basic ' + base64.b64encode(
190-
auth)
188+
auth = '{}:{}'.format(self.proxy_user, self.proxy_pass).encode()
189+
headers['Proxy-Authorization'] = 'Basic ' + str(base64.b64encode(
190+
auth))
191191

192192
if use_proxy:
193193
if self.ssl:

0 commit comments

Comments
 (0)