commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10273 - gnuradio/trunk/grc/scripts


From: jblum
Subject: [Commit-gnuradio] r10273 - gnuradio/trunk/grc/scripts
Date: Tue, 20 Jan 2009 17:38:25 -0700 (MST)

Author: jblum
Date: 2009-01-20 17:38:23 -0700 (Tue, 20 Jan 2009)
New Revision: 10273

Modified:
   gnuradio/trunk/grc/scripts/usrp2_probe
Log:
sort macs

Modified: gnuradio/trunk/grc/scripts/usrp2_probe
===================================================================
--- gnuradio/trunk/grc/scripts/usrp2_probe      2009-01-20 23:36:17 UTC (rev 
10272)
+++ gnuradio/trunk/grc/scripts/usrp2_probe      2009-01-21 00:38:23 UTC (rev 
10273)
@@ -104,11 +104,10 @@
                p = subprocess.Popen(args=args, stdout=subprocess.PIPE, 
stderr=subprocess.STDOUT, shell=False, universal_newlines=True)
                msg = p.stdout.read()
                #extract mac addrs
-               self.usrp2_macs = map(lambda l: l.split()[0], filter(lambda l: 
l.count(':') >= 5, msg.strip().splitlines()))
+               self.usrp2_macs = sorted(map(lambda l: l.split()[0], 
filter(lambda l: l.count(':') >= 5, msg.strip().splitlines())))
                #set the tree store with the mac addrs
                self.treestore.clear()
-               for usrp2_mac in self.usrp2_macs:
-                       self.treestore.append(None, (usrp2_mac,))
+               for usrp2_mac in self.usrp2_macs: self.treestore.append(None, 
(usrp2_mac,))
                #set the text with the error message for 0 found, hide the list
                #when only 1 usrp2, auto handle selection, hide the list
                #for multiple usrp2, show the list





reply via email to

[Prev in Thread] Current Thread [Next in Thread]