Bug 639586

Summary: [abrt] system-config-printer-1.2.4-1.fc13: GroupsPaneModel.py:125:remove_queues:AttributeError: 'NoneType' object has no attribute 'unlinkNode'
Product: [Fedora] Fedora Reporter: Sylvain Arth <sylvain>
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 13CC: jpopelka, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard: abrt_hash:66b50373
Fixed In Version: system-config-printer-1.2.5-6.fc13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-22 22:14:33 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:
Attachments:
Description Flags
File: backtrace none

Description Sylvain Arth 2010-10-02 11:37:49 UTC
abrt version: 1.1.13
architecture: i686
cmdline: /usr/bin/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.34.7-56.fc13.i686.PAE
package: system-config-printer-1.2.4-1.fc13
reason: GroupsPaneModel.py:125:remove_queues:AttributeError: 'NoneType' object has no attribute 'unlinkNode'
release: Fedora release 13 (Goddard)
time: 1286018165
uid: 500

backtrace
-----
GroupsPaneModel.py:125:remove_queues:AttributeError: 'NoneType' object has no attribute 'unlinkNode'

Traceback (most recent call last):
  File "/usr/share/system-config-printer/system-config-printer.py", line 3254, in on_delete_activate
    self.current_groups_pane_item.remove_queues (selected_names)
  File "/usr/share/system-config-printer/GroupsPaneModel.py", line 125, in remove_queues
    queue_node.unlinkNode ()
AttributeError: 'NoneType' object has no attribute 'unlinkNode'

Local variables in innermost frame:
queues_node: <xmlNode (text) object at 0x8aaecac>
queue_list: ['HP-Photosmart-3210']
queue_name: 'HP-Photosmart-3210'
self: <StaticGroupItem object at 0x8aadf2c (GObject at 0x8bc3dd0)>
queue_node: None

comment
-----
I found all physical printers,  classes printer as well, had been removed from all user defined groups.
When I move the fisrt printer to its dedicated group I realised I chose the wrong one.
This is the why of the steps listed above.
This bug is not fatal, except unsucessful remove and abrt notification I noticed anything else.
I finally could done the job with the same gui session (I did not have to do any relaunch)

How to reproduce
-----
1.Move a printer class to a group
2.Remove the printer class from this group
3.

Comment 1 Sylvain Arth 2010-10-02 11:37:52 UTC
Created attachment 451183 [details]
File: backtrace

Comment 3 Tim Waugh 2010-10-05 11:54:25 UTC
(In reply to comment #2)
> http://git.fedorahosted.org/git/?p=system-config-printer.git;a=commitdiff;h=30adc52384db438077f6c423f8729228bc5b2d28

I think the intention with that code is to loop through each node, deleting and freeing all of them.  So something like:

while queue_node:
  ...
  next_node = queue_node.next
  queue_node.unlinkNode ()
  queue_node.freeNode ()
  queue_node = next_node

What do you think?

Comment 4 Jiri Popelka 2010-10-05 13:18:08 UTC
(In reply to comment #3)
> I think the intention with that code is to loop through each node,
> deleting and freeing all of them.
Not all of them but only the one whose property "name" is the same as queue_name.
If there's no such node, no node will be freed.

So the current code
                while queue_node:
                    if queue_node.prop ("name") == queue_name:
                        break
                    queue_node = queue_node.next
                if queue_node:
                    queue_node.unlinkNode ()
                    queue_node.freeNode ()
could better look like
                while queue_node:
                    if queue_node.prop ("name") == queue_name:
                        queue_node.unlinkNode ()
                        queue_node.freeNode ()
                        break
                    queue_node = queue_node.next

Am I still missing something ?
Should I commit the above change or is it only a detail ?

Comment 5 Tim Waugh 2010-10-05 13:58:31 UTC
Ah, yes, I understand now.  No need to change it.

Comment 6 Fedora Update System 2010-10-13 14:47:27 UTC
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

Comment 7 Fedora Update System 2010-10-13 14:55:10 UTC
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

Comment 8 Fedora Update System 2010-10-14 06:24:23 UTC
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

Comment 9 Bug Zapper 2010-11-03 09:41:35 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '12'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 12's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 12 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 10 Sylvain Arth 2010-11-16 09:52:37 UTC
(In reply to comment #8)
> 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

Noted down though since I worked around this bug it is not a priority to me to use it again for the moment.
But in case of need to use it again, I will install the update-testing version then report any result.
Regards

Comment 11 Fedora Update System 2010-11-16 23:23:32 UTC
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.

Comment 12 Fedora Update System 2010-11-22 22:13:13 UTC
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.