~ubuntu-branches/ubuntu/jaunty/system-config-printer/jaunty-proposed

« back to all changes in this revision

Viewing changes to debian/patches/60_hp-plugin-with-hplip-3.9.2.patch

  • Committer: Bazaar Package Importer
  • Author(s): Till Kamppeter
  • Date: 2009-04-20 14:21:59 UTC
  • Revision ID: james.westby@ubuntu.com-20090420142159-tn9w1c20viyqfyy9
Tags: 1.1.3+git20090218-0ubuntu19.1
debian/patches/60_hp-plugin-with-hplip-3.9.2.patch: Make call of
hp-plugin both with and without python-qt4 also work with HPLIP 3.9.2
(LP: #363522).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -Nur -x '*.orig' -x '*~' system-config-printer-1.1.3+git20090218/system-config-printer.py system-config-printer-1.1.3+git20090218.new/system-config-printer.py
 
2
--- system-config-printer-1.1.3+git20090218/system-config-printer.py    2009-04-20 14:17:50.000000000 +0200
 
3
+++ system-config-printer-1.1.3+git20090218.new/system-config-printer.py        2009-04-20 14:18:24.000000000 +0200
 
4
@@ -4660,7 +4660,7 @@
 
5
         button_clicked = dialog.run()
 
6
         dialog.destroy()
 
7
         if (button_clicked == 1):
 
8
-            cmds = ("gksu -- hp-plugin -u",
 
9
+            cmds = ("if python -c 'import PyQt4.QtGui' 2>/dev/null; then gksu -- hp-plugin -u; else exit 255; fi",
 
10
                     "gksu -- xterm -T 'HPLIP Plugin Installation' -sb -rightbar -e hp-plugin -i")
 
11
             try:
 
12
                 install_result = -1
 
13
@@ -4676,10 +4676,6 @@
 
14
                         time.sleep (0.1)
 
15
                         p.poll ()
 
16
                     install_result = p.returncode
 
17
-                    for line in stderr.split ("\n"):
 
18
-                        if line.find ("PyQt not installed") >= 0:
 
19
-                            install_result = 255
 
20
-                            break
 
21
                     if install_result != 255:
 
22
                         break
 
23
                 if install_result == 0: