ethereum / genesis_block_generator

32 stars 255 forks source link

python 3.x hates old version #3

Closed linagee closed 8 years ago

linagee commented 8 years ago

Matches the example here: https://docs.python.org/3.3/library/json.html

CanaryInTheMine confirmed this fixed it for him.

linagee commented 8 years ago

Also might need this for 3.x compatibility.

EXTRADATA = bytearray.fromhex(d[2:] if d[:2] == '0x' else d).decode()

(above does not seem to work, some utf-8 problem?)

(or just put a python 2.x check in the code and screw over python 3.x users. maybe a better option. because fixing all of these 3.x things might break 2.x....?)

linagee commented 8 years ago

Nevermind. This is all dumb. Just update the blog post and tell people to use Python 2.x please.