pypxe / PyPXE

Pure Python PXE (DHCP-(Proxy)/TFTP/HTTP/NBD) Server
MIT License
539 stars 125 forks source link

PyPXE bails out when loading a JSON config in Python3 #181

Closed vbyrd closed 4 years ago

vbyrd commented 4 years ago

Python3 did away with the 'unicode' tag renaming in 'str'. This causes PyPXE in python 3 to bail out if we load a JSON config.

I have created PR-180 to fix this: https://github.com/pypxe/PyPXE/pull/180

Ref: https://stackoverflow.com/questions/19877306/nameerror-global-name-unicode-is-not-defined-in-python-3

the python 2to3 tool identifies these issues. It probably wouldn't hurt to run the other files through it. I may do this when I have time.

Error: Traceback (most recent call last): File "/usr/local/bin/pypxe", line 8, in sys.exit(main()) File "/usr/local/lib/python3.6/site-packages/pypxe/server.py", line 164, in main if type(loaded_config[setting]) is unicode: NameError: name 'unicode' is not defined

icb- commented 4 years ago

Merged. Thanks