Bug 625502
Summary: | [abrt] system-config-printer-1.2.3-3.fc13: system-config-printer.py:3151:rename_printer:AttributeError: 'NoneType' object has no attribute 'setAccepting' | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ben Liblit <liblit> | ||||||
Component: | system-config-printer | Assignee: | Tim Waugh <twaugh> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | low | ||||||||
Version: | 13 | CC: | dweb98, enricop, hidoufr, jpopelka, michaelmeskenazi, pingou, simon, theophanis_kontogiannis, twaugh | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | i686 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | abrt_hash:03d0e6a4 | ||||||||
Fixed In Version: | system-config-printer-1.2.5-6.fc13 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 636523 (view as bug list) | Environment: | |||||||
Last Closed: | 2010-11-22 22:14:09 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Bug Depends On: | |||||||||
Bug Blocks: | 636523 | ||||||||
Attachments: |
|
Description
Ben Liblit
2010-08-19 16:24:02 UTC
Created an attachment (id=439729) File: backtrace *** Bug 612315 has been marked as a duplicate of this bug. *** *** Bug 635538 has been marked as a duplicate of this bug. *** Steps to reproduce: 1) rename printer queue where the new name differs only in size (lower/upper case) of some characters. E.g. C6 -> c6 (comment #0) When s-c-p renames queue, it first makes a new one with the new name, copies attributes and deletes the old one. Problem is that CUPS-Add-Modify-Printer operation is case-insensitive in sense that when it discovers that adding printer already exists (ignoring case) it modifies the existing one. For looking up/comparing strcasecmp() is used, see. scheduler/printers.c:compare_printers(). In our case it means that when s-c-p tries to add a new printer in save_printer(), there's actually no adding happening because there's already one with the same name (ignoring case) existing. And at the end of save_printer() we discover that the printer with new name (case sensitive) doesn't exist and populateList() does self.printer=None. Created attachment 448714 [details]
double-renaming
Possibilities
A) Do not rename when the new name differs only in size
(lower/upper case) of some characters.
def rename_printer (self, old_name, new_name):
- if old_name == new_name:
+ if old_name.lower() == new_name.lower():
return
B) Double-rename (old_name->random_name, random_name->new_name)
(see attached patch)
C) Some dialog with warning
I think A is best. Let's follow the example of how cupsd behaves. There's also the very real possibility of the queue actually being deleted (by another user) in the mean time, so we'll have to deal with that too by checking whether self.printer == None after the call to self.duplicate_printer(). system-config-printer-1.2.5-1.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/system-config-printer-1.2.5-1.fc14 system-config-printer-1.2.5-1.fc13 has been submitted as an update for Fedora 13. https://admin.fedoraproject.org/updates/system-config-printer-1.2.5-1.fc13 system-config-printer-1.2.5-1.fc13 has been pushed to the Fedora 13 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update system-config-printer'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/system-config-printer-1.2.5-1.fc13 *** Bug 647340 has been marked as a duplicate of this bug. *** Package: system-config-printer-1.2.4-2.fc14 Architecture: x86_64 OS Release: Fedora release 14 (Laughlin) How to reproduce ----- 1. 2. 3. Comment ----- Attempted to rename a printer putting parenthesis in the name *** Bug 650226 has been marked as a duplicate of this bug. *** Package: system-config-printer-1.2.4-2.fc14 Architecture: x86_64 OS Release: Fedora release 14 (Laughlin) Comment ----- Changed the last part of the printer name from _fax to _FAX... Package: system-config-printer-1.2.4-2.fc14 Architecture: i686 OS Release: Fedora release 14 (Laughlin) How to reproduce ----- It happened when playing around with the rename button trying to reproduce in the bugzilla ticket that you Tim forwarded to the Compiz maintainer Adel. Regards. system-config-printer-1.2.5-6.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report. system-config-printer-1.2.5-6.fc13 has been pushed to the Fedora 13 stable repository. If problems still persist, please make note of it in this bug report. |