def gifaddr(interface):
# for python3
if isinstance(interface, str):
- interface = str.encode()
+ interface = interface.encode()
s = None
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)
def gifhwaddr(interface):
# for python3
if isinstance(interface, str):
- interface = str.encode()
+ interface = interface.encode()
s = None
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)