We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c6ec3ea + c167d7e commit 588fdbdCopy full SHA for 588fdbd
pywifi/_wifiutil_linux.py
@@ -245,7 +245,7 @@ def interfaces(self):
245
"""Get the wifi interface lists."""
246
247
ifaces = []
248
- for f in os.listdir(CTRL_IFACE_DIR):
+ for f in sorted(os.listdir(CTRL_IFACE_DIR)):
249
sock_file = '/'.join([CTRL_IFACE_DIR, f])
250
mode = os.stat(sock_file).st_mode
251
if stat.S_ISSOCK(mode):
@@ -264,7 +264,7 @@ def _connect_to_wpa_s(self, iface):
264
"Connection for iface '%s' aleady existed!",
265
iface)
266
267
- sock_file = '{}/{}_{}'.format('/tmp', 'pywifi', 'iface')
+ sock_file = '{}/{}_{}'.format('/tmp', 'pywifi', iface)
268
self._remove_existed_sock(sock_file)
269
sock = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM)
270
sock.bind(sock_file)
0 commit comments