Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Commit

Permalink
Fix hex decoding on Python 3
Browse files Browse the repository at this point in the history
Use binascii's unhexlify (already imported) to decode the hex since
using `decode` results in an AttributeError in Python 3.
  • Loading branch information
Noctem committed Aug 7, 2016
1 parent 249d3be commit 6b50289
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pgoapi/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,6 @@ def generateRequestHash(authticket, request):


def d2h(f):
hex = f2h(f)[2:].replace('L','')
hex = ("0" * (len(hex) % 2)) + hex
return hex.decode("hex")
hex_str = f2h(f)[2:].replace('L','')
hex_str = ("0" * (len(hex_str) % 2)) + hex_str
return unhexlify(hex_str)

0 comments on commit 6b50289

Please sign in to comment.