Fix crasher bug where remotecontrol.py was iterating over all the 70/1770/1
authorRusty Lynch <rusty.lynch@intel.com>
Tue, 18 Sep 2012 19:52:31 +0000 (12:52 -0700)
committerRusty Lynch <rusty.lynch@intel.com>
Tue, 18 Sep 2012 19:52:31 +0000 (12:52 -0700)
system interfaces and passing that interface name to a function that
could only deal with traditional network interface names.

remotecontrol/remoteserver.py [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 50a50e3..653a49f
@@ -113,8 +113,11 @@ def start():
     port = 8080
     ws_port = 9999
     for interface in interfaces():
-        if AF_INET not in ifaddresses(interface):
-            continue
+       try:
+               if AF_INET not in ifaddresses(interface):
+                       continue
+       except ValueError:
+               continue
         for link in ifaddresses(interface)[AF_INET]:
             address = link['addr']
             if address != '127.0.0.1':