X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sioc.py;h=1213dd691d761b9499d01816dbfa2e91c5c86668;hb=refs%2Fheads%2Fmaster;hp=cf85a11b58a24651ced3c91d00a2f5af8c71138c;hpb=fe5cb2992dfb9a57d301167cf9d31b977d40662e;p=pyplnet.git diff --git a/sioc.py b/sioc.py index cf85a11..1213dd6 100644 --- a/sioc.py +++ b/sioc.py @@ -22,7 +22,7 @@ def _format_ip(nip): 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) @@ -54,7 +54,7 @@ def gifconf(): 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)