Setting tag pyplnet-7.0-0
[pyplnet.git] / sioc.py
diff --git a/sioc.py b/sioc.py
index cf85a11..1213dd6 100644 (file)
--- 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)