def interfaces(self):
"""Get the wifi interface lists."""
ifaces = []
for f in os.listdir(CTRL_IFACE_DIR):
sock_file = '/'.join([CTRL_IFACE_DIR, f])
mode = os.stat(sock_file).st_mode
if stat.S_ISSOCK(mode):
iface = {}
iface['name'] = f
ifaces.append(iface)
self._connect_to_wpa_s(f)
return ifaces
评论列表
文章目录