1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-25 07:32:29 +01:00

Make sure we don't die if the kernel doesn't support some socket family

This commit is contained in:
David Paleino
2013-01-23 21:20:27 +01:00
parent 47891183d1
commit 2eded80a9b

View File

@@ -148,7 +148,10 @@ def isWireless(devname):
we = None
for t in [socket.AF_INET, socket.AF_INET6, socket.AF_IPX, socket.AF_AX25,
socket.AF_APPLETALK]:
sk = socket.socket(t, socket.SOCK_DGRAM)
try:
sk = socket.socket(t, socket.SOCK_DGRAM)
except socket.error:
sk = None
if sk is None:
continue
skfd = sk.fileno()