[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#692431: hplip: kde4-kdesudo-support.dpatch is broken (fix attached)



Source: hplip
Version: 3.12.10a-1
Severity: normal
Tags: patch

Dear maintainers,

The kde4-kdesudo-support.dpatch tries to all "utils.which" function
which is not defined.

This causes hp-toolbox to crash with a traceback. Example:

| Traceback (most recent call last):
|   File "/usr/bin/hp-diagnose_queues", line 251, in <module>
|     if add_group(core) is False:
|   File "/usr/bin/hp-diagnose_queues", line 93, in add_group
|     su_sudo = utils.su_sudo()
|   File "/usr/share/hplip/base/utils.py", line 1782, in su_sudo
|     elif utils.which('/usr/lib/kde4/libexec/kdesu'):
| NameError: global name 'utils' is not defined

A patch that fixes this is attached.

Thanks for considering the patch,
--
Dmitry Shachnev
diff -Nru hplip-3.12.6/debian/patches/kde4-kdesudo-support.dpatch hplip-3.12.6/debian/patches/kde4-kdesudo-support.dpatch
--- hplip-3.12.6/debian/patches/kde4-kdesudo-support.dpatch	2012-05-26 04:25:50.000000000 +0400
+++ hplip-3.12.6/debian/patches/kde4-kdesudo-support.dpatch	2012-10-21 13:42:36.000000000 +0400
@@ -13,10 +13,10 @@
      if which('kdesu'):
          su_sudo_str = 'kdesu -- %s'
  
-+    elif utils.which('/usr/lib/kde4/libexec/kdesu'):
++    elif os.path.isfile('/usr/lib/kde4/libexec/kdesu'):
 +        su_sudo_str = '/usr/lib/kde4/libexec/kdesu -- %s'
 +
-+    elif utils.which('kdesudo'):
++    elif which('kdesudo'):
 +        su_sudo_str = 'kdesudo -- %s'
 +
      elif which('gnomesu'):

Reply to: