abrt version: 1.1.13 architecture: i686 cmdline: python /usr/share/system-config-printer/system-config-printer.py component: system-config-printer executable: /usr/share/system-config-printer/system-config-printer.py kernel: 2.6.33.6-147.2.4.fc13.i686 package: system-config-printer-1.2.3-3.fc13 reason: system-config-printer.py:3151:rename_printer:AttributeError: 'NoneType' object has no attribute 'setAccepting' release: Fedora release 13 (Goddard) time: 1282235009 uid: 500 backtrace ----- system-config-printer.py:3151:rename_printer:AttributeError: 'NoneType' object has no attribute 'setAccepting' Traceback (most recent call last): File "/usr/share/system-config-printer/system-config-printer.py", line 3085, in printer_name_edited self.rename_printer (name, newname) File "/usr/share/system-config-printer/system-config-printer.py", line 3151, in rename_printer self.printer.setAccepting (True) AttributeError: 'NoneType' object has no attribute 'setAccepting' Local variables in innermost frame: new_name: 'c6' self: <__main__.GUI instance at 0x8867bcc> rejecting: False old_name: u'C6'
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.
http://git.fedorahosted.org/git/?p=system-config-printer.git;a=commitdiff;h=332fdc86be253a3b91720f64685ed2507b308184
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().
http://git.fedorahosted.org/git/?p=system-config-printer.git;a=commitdiff;h=01d61dcfc52ef002accd9d16f840ef4ffd3b4d4c
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.