nut
nut copied to clipboard
Make `import Server` in `nut.py` conditional
Move import Server
into if args.server:
code block so it doesn't get imported when it's not used (i.e. on python nut.py --decompress <filename>
) and doesn't throw an exception on pycurl-less systems (i.e. Windows as per requirements.txt
, line 20).
Minimal testing done:
before change --decompress
throws an exception;
after change --decompress
works, -S
throws an exception.
for pycurl on windows use the prebuilt wheel - https://github.com/blawar/nut/blob/master/tests/pycurl-7.43.0.5-cp39-cp39-win_amd64.whl