Skip to content

Commit

Permalink
Fixed python 2.7. compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
M1ha-Shvn committed May 8, 2019
1 parent d4fe07f commit c6af225
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/django_pg_hll/values.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def __init__(self, data, *args, **extra):

# Psycopg2 returns Binary results as hex string, prefixed by \x but requires bytes for saving.
if isinstance(data, six.string_types) and data.startswith(r'\x'):
data = bytes.fromhex(data[2:])
data = bytearray.fromhex(data[2:])
elif isinstance(data, bytes):
pass
else:
Expand Down

0 comments on commit c6af225

Please sign in to comment.