Package: printconf
Version: 0.7.4.12
Severity: important

printconf died when I tried to install my HP LaserJet 4L:
 
[EMAIL PROTECTED]:~$ printconf 
Traceback (most recent call last):
  File "/usr/bin/printconf", line 121, in ?
    if not pdbinfo:
NameError: name 'pdbinfo' is not defined
[EMAIL PROTECTED]:~$


Applying this small patch seemed to solve the problem:

--- /usr/bin/printconf~ 2005-05-02 03:27:08.000000000 +0200
+++ /usr/bin/printconf  2005-05-11 00:07:40.000000000 +0200
@@ -117,6 +117,8 @@
     desc = detectdata.get('description')
     if desc:
         pdbinfo = printdb.autodetect_ids.get(desc)
+    else:
+        pdbinfo = None

     if not pdbinfo:
         mfg = detectdata.get('manufacturer', '')


[EMAIL PROTECTED]:~$ printconf
Configuring HP LaserJet 4L on parallel:/dev/lp0 with ljet4 driver as queue 
"laserjet_4l".
Use of uninitialized value in substitution (s///) at 
/usr/share/perl5/Foomatic/DB.pm line 3432.

Restarting Common Unix Printing System: cupsd.
If printconf was unable to install all of your printers, please visit 
http://www.linuxprinting.org/ for printer information and support from fellow 
users.
[EMAIL PROTECTED]:~$


Also, running printconf as non-root gives another NameError:

tomyl:~$ printconf
Traceback (most recent call last):
  File "/usr/bin/printconf", line 51, in ?
      print >> sys.stderr, "Please run printconf as root or specify the 
--dry-run option."
NameError: name 'sys' is not defined
tomyl:~$ 

The sys module is obviously not imported.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (600, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.11.7mono0
Locale: LANG=C, LC_CTYPE=sv_SE (charmap=ISO-8859-1)

Versions of packages printconf depends on:
ii  cupsys                    1.1.23-10      Common UNIX Printing System(tm) - 
ii  cupsys-client             1.1.23-10      Common UNIX Printing System(tm) - 
ii  debconf [debconf-2.0]     1.4.49         Debian configuration management sy
ii  foomatic-db               20050420-1     linuxprinting.org printer support 
ii  foomatic-db-gimp-print    4.2.7-10       linuxprinting.org printer support 
ii  foomatic-db-hpijs         1.5-20050420-1 linuxprinting.org printer support 
ii  gs                        8.01-5         Transitional package
ii  gs-esp [gs]               7.07.1-9       The Ghostscript PostScript interpr
ii  gs-gpl [gs]               8.01-5         The GPL Ghostscript PostScript int
ii  python                    2.3.5-2        An interactive high-level object-o
ii  python-foomatic           0.7.4.12       Python interface to the Foomatic p

-- debconf information:
* printconf/setup_printers: false
  printconf/printconf_run: false


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to