Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'master' of github.com:akkana/netutils

  • Loading branch information...
commit 8fe877425adc574fe54fc86b0b357d1448910d14 2 parents 47573d0 + a38ea82
Akkana Peck authored
Showing with 6 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +4 −0 netscheme
  3. +1 −0  netutils.py
1  .gitignore
View
@@ -0,0 +1 @@
+*.pyc
4 netscheme
View
@@ -373,6 +373,7 @@ psk="%s"
def is_debian() :
# Ubuntu 12.04 Precise Pangolin has broken Debian-style networking,
# so check whether we're running it:
+ #return False
try :
lsb = open("/etc/lsb-release")
is_ubuntu = False
@@ -425,6 +426,9 @@ def print_current_scheme() :
def list_accesspoints(maxap=20) :
aplist = netutils.get_accesspoints()
+ # Sort the list be ap.quality
+ aplist.sort(cmp=lambda x,y: cmp(y.quality, x.quality))
+
print "Visible access points:"
for ap in aplist :
# Show mode if it's anything but Master -- e.g. Ad-hoc
1  netutils.py
View
@@ -488,6 +488,7 @@ def get_accesspoints() :
if not wiface and iface.wireless :
wiface = iface
if not wiface : # No wireless interface on this system
+ print "No wireless interface! Interfaces were", ifaces
return None
if not wiface.up :
wiface.ifconfig_up()
Please sign in to comment.
Something went wrong with that request. Please try again.