Bug 126252 - Printconf doesn't allow queue names that start with numbers
Summary: Printconf doesn't allow queue names that start with numbers
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: alchemist
Version: 2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-17 23:51 UTC by Stephane Peter
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-12-10 12:19:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Stephane Peter 2004-06-17 23:51:17 UTC
Description of problem:

Printconf chokes when it encounters any queue name that starts with a
number. While it is not possible to create such queues through
printtool directly, this can happen if the user does it through the
CUPS interface, or through a third-party program.

Version-Release number of selected component (if applicable):

Has been happening since at least Redhat 9.

How reproducible:
Consistent

Steps to Reproduce:
1. Create a queue with a name that starts with a digit (like
123printer), through the CUPS web interface.
2. Run printtool
3. Witness the stack dump.
  
Actual results:

printtool is unusable until the queue is removed manually.

Expected results:

No crash should occur. It is also unnecessary to restrict the queue
names this way, as numeric queue names are perfectly well supported by
both CUPS and LPRng.

Here is a typical Python stack dump :

Traceback (most recent call last):
  File "/usr/sbin/printconf", line 9, in ?
    import queueTree
  File "/usr/share/printconf/util/queueTree.py", line 1235, in ?
    queueTree()
  File "/usr/share/printconf/util/queueTree.py", line 140, in __init__
    cups_import.import_cups_queues ()
  File "/usr/share/printconf/util/cups_import.py", line 183, in
import_cups_queues
    line[i][1] == "D")
  File "/usr/share/printconf/util/cups_import.py", line 132, in
_discover_queue
    construct_queue (type_space, data_dict, driver_tuple)
  File "/usr/share/printconf/util/printconf_conf.py", line 879, in
construct_queue
    queue =
queue_edit.dynamic_queue_ctx.data["/printconf/print_queues"].addData(AdmListType,
queue_name)
ValueError: "105brightq" is an invalid name.

Comment 1 Tim Waugh 2004-06-25 11:06:37 UTC
This is an alchemist limitation.

Comment 2 Tim Waugh 2004-12-10 12:19:24 UTC
Worked around in Fedora development.


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