Skip to content

Commit

Permalink
support python 3 encode
Browse files Browse the repository at this point in the history
  • Loading branch information
jmg committed Aug 11, 2022
1 parent 1b1a392 commit 3ee3228
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pyfb/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,13 @@ def _make_request(self, url, data=None):
"""
if not data:
data = None
else:
try:
data = data.encode("utf-8")
except:
pass

return urlopen(url, data.encode("utf-8")).read()
return urlopen(url, data).read()

def _make_auth_request(self, path, extra_params=None, **data):
"""
Expand Down

0 comments on commit 3ee3228

Please sign in to comment.