Bug 155171 - cups_import.which_spooler () in cups_import.py causes error "IndexError: list index out of range"
cups_import.which_spooler () in cups_import.py causes error "IndexError: list...
Status: CLOSED DUPLICATE of bug 145904
Product: Fedora
Classification: Fedora
Component: system-config-printer (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-17 11:15 EDT by Carlo Wood
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-18 07:53:40 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Carlo Wood 2005-04-17 11:15:18 EDT
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 07:53:40 EDT

*** 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.