Oct-24-2019, 08:33 AM
data
is byte stringyou need to compare it with
b'EXISTS'
on line 17:if data[:6] == b'EXISTS':or decode data:
if data[:6].decode() == 'EXISTS':also as per PEP8 it's better to use startswith:
if data.decode().startswith('EXISTS'):
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs