Debian Codegraph @

debian/patches/run_app_crash

raw
1 Forwarded: https://gitlab.com/dogtail/dogtail/-/merge_requests/59
2
3 commit c80b35033f28ba628694a031e022b9ef94bc6cbd
4 Author: Samuel Thibault <[email protected]>
5 Date: Thu Mar 5 20:59:27 2026 +0100
6
7 utils.run: Also ignore gi.repository.GLib.GError exceptions
8
9 As seen in some CI logs:
10
11 https://ci.debian.net/packages/d/dogtail/testing/ppc64el/69243745/
12
13 806s ======================================================================
14 806s ERROR: test_custom_actions_table_cell (test_procedural.TestActions.test_custom_actions_table_cell)
15 806s ----------------------------------------------------------------------
16 806s Traceback (most recent call last):
17 806s File "/tmp/autopkgtest-lxc.rqlxm3x_/downtmp/autopkgtest_tmp/tests/test_procedural.py", line 21, in setUp
18 806s self.pid = run('gtk3-demo')
19 806s ~~~^^^^^^^^^^^^^
20 806s File "/usr/lib/python3/dist-packages/dogtail/procedural.py", line 507, in run
21 806s pid = utilsRun(application + " " + arguments, appName=appName)
22 806s File "/usr/lib/python3/dist-packages/dogtail/utils.py", line 131, in run
23 806s if child.name == appName:
24 806s ^^^^^^^^^^
25 806s gi.repository.GLib.GError: atspi_error: The application no longer exists (0)
26
27 we may get gi.repository.GLib.GError exceptions if while waiting for
28 gtk3-demo to start, some applications stops (thus making getting child.name
29 fail). We can ignore that exception, just like we ignore AttributeError.
30
31 diff --git a/dogtail/utils.py b/dogtail/utils.py
32 index d6b2658..8737aa3 100644
33 --- a/dogtail/utils.py
34 +++ b/dogtail/utils.py
35 @@ -139,6 +139,8 @@ def run(string, timeout=config.runTimeout, interval=config.runInterval, desktop=
36 return pid
37 except AttributeError: # pragma: no cover
38 pass
39 + except gi.repository.GLib.GError: # pragma: no cover
40 + pass
41
42 doDelay(interval)
43