Skip to content

Commit 98e72a3

Browse files
authored
Merge pull request #146 from siijmDqEaiPR/python3_proxy_compat
Fix using an authenticated proxy for python 3
2 parents 6dbf1ae + 0002a40 commit 98e72a3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dyn/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
Requires Python 2.6 or higher, or the "simplejson" package.
77
"""
8-
version_info = (1, 8, 4)
8+
version_info = (1, 8, 5)
99
__name__ = 'dyn'
1010
__doc__ = 'A python wrapper for the DynDNS and DynEmail APIs'
1111
__author__ = '''

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)