Syntax issue ?
popoption opened this issue · comments
Hi,
I'm running into this issue on my Mac. Below is the terminal output (latest version of python, json file configured per instructions)
Last login: Sun Dec 18 10:24:37 on ttys001
TheFlame:~ popoption$ cd '/Users/popoption/Desktop/DHCPy-scanner-master/' && '/usr/local/bin/python3' '/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py' && echo Exit status: $? && exit 1
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:96: SyntaxWarning: "is" with a literal. Did you mean "=="?
if key is 1:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:99: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif key is 3:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:102: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif key is 6:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:105: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif key is 28:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:108: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif key is 51:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:111: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif key is 53:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:113: SyntaxWarning: "is" with a literal. Did you mean "=="?
if ord(value) is 1:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:115: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif ord(value) is 2:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:117: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif ord(value) is 3:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:119: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif ord(value) is 4:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:121: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif ord(value) is 5:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:123: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif ord(value) is 6:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:127: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif key is 54:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:136: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif key is 58:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:139: SyntaxWarning: "is" with a literal. Did you mean "=="?
elif key is 59:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:154: SyntaxWarning: "is not" with a literal. Did you mean "!="?
while nextOption is not 255:
/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py:154: SyntaxWarning: "is not" with a literal. Did you mean "!="?
while nextOption is not 255:
There was an exception with the bind: [Errno 13] Permission denied
Traceback (most recent call last):
File "/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py", line 267, in
s.run()
File "/Users/popoption/Desktop/DHCPy-scanner-master/scanner.py", line 248, in run
dhcpSrv.sendto(self.buildDiscoverPacket(transactionID), ('', 67))
OSError: [Errno 9] Bad file descriptor
TheFlame:DHCPy-scanner-master popoption$
Thanks!
Hello there!
Which version of Python are you running precisely?