[debian-edu-commits] r78695 - trunk/src/hw-support-handler

pere at alioth.debian.org pere at alioth.debian.org
Thu Jan 10 09:52:33 UTC 2013


Author: pere
Date: 2013-01-10 09:52:33 +0000 (Thu, 10 Jan 2013)
New Revision: 78695

Modified:
   trunk/src/hw-support-handler/hw-support-handlerd
Log:
Fix logic when several packages can be installed.

Modified: trunk/src/hw-support-handler/hw-support-handlerd
===================================================================
--- trunk/src/hw-support-handler/hw-support-handlerd	2013-01-10 06:17:42 UTC (rev 78694)
+++ trunk/src/hw-support-handler/hw-support-handlerd	2013-01-10 09:52:33 UTC (rev 78695)
@@ -66,9 +66,10 @@
     p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
     while True:
         retcode = p.poll()
-        pkg = p.stdout.readline()
-        if pkg != "":
-            pkgs.append(pkg.rstrip())
+        pkgline = p.stdout.readline()
+        if pkgline != "":
+            for pkg in pkgline.rstrip().split(" "):
+                pkgs.append(pkg)
         if(retcode is not None):
             break
     return pkgs
@@ -90,6 +91,7 @@
             print "Discovered USB device %04x:%04x" % (vendor, device)
             if (vendor, device) not in hw_seen:
                 pkgs = get_pkg_suggestions(bus, vendor, device)
+#                print pkgs
                 newpkg = []
                 for pkg in pkgs:
                     if pkg not in pkg_suggested and not is_pkg_installed(pkg):




More information about the debian-edu-commits mailing list