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

pere at alioth.debian.org pere at alioth.debian.org
Wed Jan 9 22:37:27 UTC 2013


Author: pere
Date: 2013-01-09 22:37:27 +0000 (Wed, 09 Jan 2013)
New Revision: 78690

Modified:
   trunk/src/hw-support-handler/hw-support-handlerd
Log:
Minor bugfixes, increase display time for notification and improve debug logging.

Modified: trunk/src/hw-support-handler/hw-support-handlerd
===================================================================
--- trunk/src/hw-support-handler/hw-support-handlerd	2013-01-09 20:57:42 UTC (rev 78689)
+++ trunk/src/hw-support-handler/hw-support-handlerd	2013-01-09 22:37:27 UTC (rev 78690)
@@ -17,15 +17,19 @@
     print "Buttonclicked: %s" % string.join(pkgs, " ")
 
 def notify(bus, vendor, device, pkgs):
-    msg ="New %s device [%04x:%04x] supported by package(s) %s.  To install, run /sbin/discover-pkginstall as user root." \
+    info = "New %s device [%04x:%04x] supported by package(s) %s." \
         % (bus, vendor, device, string.join(pkgs, " "))
+    instructions = "To install, run /sbin/discover-pkginstall as user root."
+    msg = info + "  " + instructions
 
+    print info
+
     # Initializite pynotify
     if not pynotify.init("test"):
         return False
 
     n = pynotify.Notification(msg)
-    n.set_timeout(3000)
+    n.set_timeout(10000)
     n.add_action("clicked",
                  "Please install program(s)",
                  notify_pleaseinstall, pkgs)
@@ -63,7 +67,7 @@
         retcode = p.poll()
         pkg = p.stdout.readline()
         if pkg != "":
-            pkgs.append(pkg)
+            pkgs.append(pkg.rstrip())
         if(retcode is not None):
             break
     return pkgs




More information about the debian-edu-commits mailing list