Description
Errors under Python3.5.3 when trying to run the example on the GIT README
Python 3.5.3 (default, Sep 27 2018, 17:25:39)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
from nut2 import PyNUTClient
client = PyNUTClient()
client.help()
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.5/dist-packages/nut2.py", line 425, in help
self._srv_handler.write("HELP\n")
File "/usr/lib/python3.5/telnetlib.py", line 287, in write
if IAC in buffer:
TypeError: 'in ' requires string as left operand, not bytes
client.list_ups()
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.5/dist-packages/nut2.py", line 133, in list_ups
self._srv_handler.write("LIST UPS\n")
File "/usr/lib/python3.5/telnetlib.py", line 287, in write
if IAC in buffer:
TypeError: 'in ' requires string as left operand, not bytes