dogtail-devel [Bug 328318] New: Nodes without children return an exception when you get children property



Do not reply to this via email (we are currently unable to handle email
responses and they get discarded).  You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=328318
 dogtail | Framework | Ver: CVS HEAD

           Summary: Nodes without children return an exception when you get
                    children property
           Product: dogtail
           Version: CVS HEAD
          Platform: Other
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: Framework
        AssignedTo: dogtail-maint gnome bugs
        ReportedBy: jdapena igalia com
         QAContact: dogtail-maint gnome bugs
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Please describe the problem:
Suppose you have a node without children, and you try to get its children, with
a call like "node.children". If this node hasn't got any children, it returns
an
AttributeError exception.

The expected behaviour is returning an empty list, I think.

Steps to reproduce:
1. Get a node without children
2. Try to get the property children



Actual results:
You get an AttributeError exception in get_attr.

Expected results:
You should get an empty list.

Does this happen every time?
Yes

Other information:
The problem is in the __get_attr__ method of Node (see tree.py). For the
"children" case, it tries to add the children to the list. If the list remains
empty  (as in the case it's empty), it raises the exception, when it should
return the empty list.


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the QA contact for the bug.
You are watching the assignee for the bug.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]