Forwarded: https://gitlab.gnome.org/GNOME/pyatspi2/-/merge_requests/37

commit 445d64bb1abe946bde4b979a7f34757c2120aaca
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Wed Dec 17 15:54:56 2025 +0100

    pasy: Fix reporting exceptions
    
    We currently get:
    
    Traceback (most recent call last):
      [...]
    AttributeError: 'xml.dom.minidom.Element' object has no attribute 'ownerDocument'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/build/reproducible-path/pyatspi-2.57.0/tests/pyatspi/pasytest/Pasy.py", line 118, in idle_handler
        step.run()
        ~~~~~~~~^^
      File "/build/reproducible-path/pyatspi-2.57.0/tests/pyatspi/pasytest/Pasy.py", line 59, in run
        self.entry()
        ~~~~~~~~~~^^
      File "/build/reproducible-path/pyatspi-2.57.0/tests/pyatspi/pasytest/Pasy.py", line 83, in entry
        self.fail(e.message)
                  ^^^^^^^^^
    AttributeError: 'AttributeError' object has no attribute 'message'
    
    With the fix, we get as expected:
    
            test_tree - FAILED - 'xml.dom.minidom.Element' object has no attribute 'ownerDocument'

diff --git a/tests/pyatspi/pasytest/Pasy.py b/tests/pyatspi/pasytest/Pasy.py
index df80204..52fced2 100644
--- a/tests/pyatspi/pasytest/Pasy.py
+++ b/tests/pyatspi/pasytest/Pasy.py
@@ -80,7 +80,7 @@ class PasyTestFunc(PasyTestStep):
 		try:
 			self._func(self)
 		except Exception as e:
-			self.fail(e.message)
+			self.fail(str(e))
 			traceback.print_exc()
 		self.win()
 
