Skip to content

Commit

Permalink
Merge pull request #146 from siijmDqEaiPR/python3_proxy_compat
Browse files Browse the repository at this point in the history
Fix using an authenticated proxy for python 3
  • Loading branch information
siijmDqEaiPR authored Mar 20, 2023
2 parents 6dbf1ae + 0002a40 commit 98e72a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dyn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Requires Python 2.6 or higher, or the "simplejson" package.
"""
version_info = (1, 8, 4)
version_info = (1, 8, 5)
__name__ = 'dyn'
__doc__ = 'A python wrapper for the DynDNS and DynEmail APIs'
__author__ = '''
Expand Down
6 changes: 3 additions & 3 deletions dyn/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ def connect(self):
use_proxy = True

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

if use_proxy:
if self.ssl:
Expand Down

0 comments on commit 98e72a3

Please sign in to comment.