After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 428617 - AttributeError: Root::applications - missing findAllChildrenSatisfying
AttributeError: Root::applications - missing findAllChildrenSatisfying
Status: RESOLVED FIXED
Product: dogtail
Classification: Deprecated
Component: Framework
CVS HEAD
Other All
: Normal critical
: ---
Assigned To: Dogtail Maintainers
Dogtail Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-04-11 13:31 UTC by Alexander Todorov
Modified: 2008-06-13 14:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Alexander Todorov 2007-04-11 13:31:12 UTC
Steps to reproduce:
1. Createa test script containing the following:

from dogtail.procedural import *

for node in focus.desktop.applications():
    print node.name

2. Run the script
3. Your script will crash


Stack trace:
Traceback (most recent call last):
  • File "./test.py", line 18 in ?
    for node in focus.desktop.applications():
  • File "/usr/lib/python2.4/site-packages/dogtail/tree.py", line 1090 in applications
    return root.findAllChildrenSatisfying(predicate.GenericPredicate(roleName="application"), recursive=False)
  • File "/usr/lib/python2.4/site-packages/dogtail/tree.py", line 567 in __getattr__
    else: raise AttributeError, attr
AttributeError: findAllChildrenSatisfying


Other information:
Workaround:
from dogtail.procedural import *
from dogtail import predicate

for node in focus.desktop.findChildren(predicate.GenericPredicate(roleName="application"), False):
    print node.name

The method Node::findAllChildrenSatisfying is not existent. There is a method Node::findChildren which seems to do the same job.
There is a FIXME comment just above Root::applications
Comment 1 Yann Dirson 2008-06-13 09:59:46 UTC
This looks like the single place where findAllChildrenSatisfying appears in the code.  It seems obvious it should be findChildren instead.  Is there any reason why this but is still UNCONFIRMED ?
Comment 2 Zack Cerza 2008-06-13 14:33:57 UTC
Only because I forgot to mark it as fixed in SVN :)