Changes regarding hostapd errors
This commit is contained in:
parent
28f3af5c9f
commit
0ef31d13a5
@ -242,7 +242,6 @@ class Network(object):
|
|||||||
with open("/tmp/hostapd.log", "r") as f:
|
with open("/tmp/hostapd.log", "r") as f:
|
||||||
log = f.read()
|
log = f.read()
|
||||||
err = ["Could not configure driver mode",
|
err = ["Could not configure driver mode",
|
||||||
"Could not connect to kernel driver",
|
|
||||||
"driver initialization failed"]
|
"driver initialization failed"]
|
||||||
if not any(e in log for e in err):
|
if not any(e in log for e in err):
|
||||||
if "AP-ENABLED" in log:
|
if "AP-ENABLED" in log:
|
||||||
@ -302,9 +301,6 @@ class Network(object):
|
|||||||
This enable interfaces, with a simple check.
|
This enable interfaces, with a simple check.
|
||||||
:return: bool if everything goes well
|
:return: bool if everything goes well
|
||||||
"""
|
"""
|
||||||
sh = sp.Popen(["ifconfig", iface],
|
|
||||||
stdout=sp.PIPE, stderr=sp.PIPE)
|
|
||||||
sh = sh.communicate()
|
|
||||||
|
|
||||||
if b"<UP," in sh[0]:
|
if b"<UP," in sh[0]:
|
||||||
return True # The interface is up.
|
return True # The interface is up.
|
||||||
|
Loading…
Reference in New Issue
Block a user