Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 155171 - cups_import.which_spooler () in cups_import.py causes error "IndexError: list index out of range"
Summary: cups_import.which_spooler () in cups_import.py causes error "IndexError: list...
Keywords:
Status: CLOSED DUPLICATE of bug 145904
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-printer
Version: 3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-04-17 15:15 UTC by Carlo Wood
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-04-18 11:53:40 UTC


Attachments (Terms of Use)

Description Carlo Wood 2005-04-17 15:15:18 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

Description of problem:
When starting cups, either during boot or manually, I get:

/etc/rc.d/init.d>./cups start
Starting cups: Traceback (most recent call last):
  File "/usr/sbin/printconf-backend", line 7, in ?
    import backend
  File "/usr/share/printconf/util/backend.py", line 54, in ?
    which = cups_import.which_spooler ()
  File "/usr/share/printconf/util/cups_import.py", line 191, in which_spooler
    which = l.split ('.')[1].strip ()
IndexError: list index out of range


Version-Release number of selected component (if applicable):
system-config-printer-0.6.116.1.4-1

How reproducible:
Always

Steps to Reproduce:
1.Install the driver that comes with the Samsung ML-1520 laserprinter
2./etc/rc.d/init.d/cups start
3.
  

Actual Results:  See error in 'Description'

Expected Results:  No phyton 'trace' should be printed.

Additional info:

The reason for this is because there is no '.' in the investigated
output at that point.  In fact, in my case I have:

/etc/rc.d/init.d>LANG=C /usr/sbin/alternatives --display print | head -n 2
print - status is auto.
 link currently points to /usr/local/linuxprinter/bin/llpr

Where "/usr/local/linuxprinter/bin/llpr" is part of the "Linux Printer Package",
a driver that came with the Samsung ML-1520 laser printer (they support linux).

Since the result of which_spooler is only used to test
whether or not the CUPS queues need to be imported, I think that a
better, more generally robust, test can be easily performed.  Not
one that assumes a '.'.  For example, you could return 'Other' when
there is no '.'.

Here is the full out of /usr/sbin/alternatives --display print

print - status is auto.
 link currently points to /usr/local/linuxprinter/bin/llpr
/usr/bin/lpr.cups - priority 40
 slave print-cancel: /usr/bin/cancel.cups
 slave print-lp: /usr/bin/lp.cups
 slave print-lpq: /usr/bin/lpq.cups
 slave print-lprm: /usr/bin/lprm.cups
 slave print-lpstat: /usr/bin/lpstat.cups
 slave print-lpc: /usr/sbin/lpc.cups
 slave print-cancelman: /usr/share/man/man1/cancel-cups.1.gz
 slave print-lpman: /usr/share/man/man1/lp-cups.1.gz
 slave print-lpqman: /usr/share/man/man1/lpq-cups.1.gz
 slave print-lprman: /usr/share/man/man1/lpr-cups.1.gz
 slave print-lprmman: /usr/share/man/man1/lprm-cups.1.gz
 slave print-lpstatman: /usr/share/man/man1/lpstat-cups.1.gz
 slave print-lpcman: /usr/share/man/man8/lpc-cups.8.gz
/usr/local/linuxprinter/bin/llpr - priority 90
 slave print-cancel: /usr/bin/cancel.cups
 slave print-lp: /usr/local/linuxprinter/bin/llpr
 slave print-lpq: /usr/bin/lpq.cups
 slave print-lprm: /usr/bin/lprm.cups
 slave print-lpstat: /usr/bin/lpstat.cups
 slave print-lpc: /usr/sbin/lpc.cups
 slave print-cancelman: /usr/share/man/man1/cancel-cups.1.gz
 slave print-lpman: /usr/share/man/man1/lp-cups.1.gz
 slave print-lpqman: /usr/share/man/man1/lpq-cups.1.gz
 slave print-lprman: /usr/share/man/man1/lpr-cups.1.gz
 slave print-lprmman: /usr/share/man/man1/lprm-cups.1.gz
 slave print-lpstatman: /usr/share/man/man1/lpstat-cups.1.gz
 slave print-lpcman: /usr/share/man/man8/lpc-cups.8.gz
Current `best' version is /usr/local/linuxprinter/bin/llpr.

Comment 1 Tim Waugh 2005-04-18 11:53:40 UTC

*** This bug has been marked as a duplicate of 145904 ***


Note You need to log in before you can comment on or make changes to this bug.