Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Update server.py for Python3 #180

Merged
merged 1 commit into from
Aug 5, 2020
Merged

Update server.py for Python3 #180

merged 1 commit into from
Aug 5, 2020

Conversation

vbyrd
Copy link
Contributor

@vbyrd vbyrd commented Aug 5, 2020

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.

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

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

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.

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

Error: Traceback (most recent call last):
  File "/usr/local/bin/pypxe", line 8, in <module>
    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- icb- merged commit 4299f14 into pypxe:master Aug 5, 2020
@icb-
Copy link
Collaborator

icb- commented Aug 5, 2020

Thanks for your contribution

@vbyrd vbyrd deleted the patch-1 branch August 6, 2020 06:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants