Update network.py

This commit is contained in:
Félix Aimé authored and GitHub committed 2021-06-15 15:51:42 +02:00
1 parent 7c1b0f7ced
commit 08d24632a3
1 file changed
+3 -1
+3 -1
View File
@@ -344,7 +344,7 @@ class Network(object):
Deduce the channel to have for the AP in order to prevent Deduce the channel to have for the AP in order to prevent
kind of jamming between the two wifi interfaces. kind of jamming between the two wifi interfaces.
""" """
if self.iface_out[0] == "w":
# Get the channel of the connected interface # Get the channel of the connected interface
sh = sp.Popen(["iw", self.iface_out, "info"], sh = sp.Popen(["iw", self.iface_out, "info"],
stdout=sp.PIPE, stderr=sp.PIPE).communicate() stdout=sp.PIPE, stderr=sp.PIPE).communicate()
@@ -353,3 +353,5 @@ class Network(object):
# Return a good candidate. # Return a good candidate.
return "11" if int(chn) < 7 else "1" return "11" if int(chn) < 7 else "1"
else:
return "1"