diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-01-10 11:08:42 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-01-10 11:08:42 (GMT) |
commit | c287fda229d5157b47a5d8f0218e813e5d96dd75 (patch) | |
tree | 06c5f44d055cc2213642e845e024292b26cbb5cd /tests | |
parent | 0291b103a8e76003edb9766dc243b4595125b6dd (diff) |
Revert "Wait until the tree is populated"
This reverts commit 33d4064b7c3bfa6d001b397b3e563fd7f47792ac.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sugar/shell.py | 2 | ||||
-rw-r--r-- | tests/sugar/tree.py | 18 |
2 files changed, 3 insertions, 17 deletions
diff --git a/tests/sugar/shell.py b/tests/sugar/shell.py index 3d33259..f6be687 100644 --- a/tests/sugar/shell.py +++ b/tests/sugar/shell.py @@ -90,5 +90,5 @@ try: main() except: logging.error(traceback.format_exc()) - logging.error("\n%s" % tree.get_root(wait=False).dump()) + logging.error("\n%s" % tree.get_root().dump()) raise diff --git a/tests/sugar/tree.py b/tests/sugar/tree.py index 6607371..1a58277 100644 --- a/tests/sugar/tree.py +++ b/tests/sugar/tree.py @@ -7,22 +7,8 @@ from gi.repository import GLib Atspi.set_timeout(-1, -1) -def get_root(wait=True): - desktop = Node(Atspi.get_desktop(0)) - - if not wait: - return desktop - - n_tries = 0 - while n_tries < 50: - if desktop.get_children(): - return desktop - - n_tries = n_tries + 1 - logging.info("Waiting for a valid accessibility tree %d" % n_tries) - time.sleep(1) - - return None +def get_root(): + return Node(Atspi.get_desktop(0)) def _retry_find(func): |