Commit 881a9cc4 authored by Nolan's avatar Nolan

Move sorting SSIDs into generic code.

parent c0077c81
......@@ -94,6 +94,7 @@ def test_elevate():
def step1():
ssids = osal.get_ssids()
ssids.sort(key=lambda i: (i[0], i[1]), reverse=True)
ssids = [ ("%s (signal %s)" % (ssid[2], ssid[1]), ssid[2], ssid[0]) for ssid in ssids ]
return template("step1", { "mountlist": step1_api1(), "ssids": ssids })
import os, subprocess
def get_mounts():
#XXX Check for /sys/sda/sdd/removable?
ret = []
with open("/proc/mounts", 'r') as f:
for line in f:
......@@ -40,5 +41,4 @@ def get_ssids():
ssids = [ (i[0] == 'yes', int(i[1]), i[2]) for i in ssids ]
ssids.sort(key=lambda i: (i[0], i[1]), reverse=True)
return ssids
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment