git://git.onelab.eu
/
pyplnet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more fixes for python3
[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):
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)
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):
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)
s = None
try:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0)