gdb/testsuite: handle older Python versions in gdb.python/py-disasm.exp
It was pointed out on the mailing list that the new tests added in
this commit:
commit
4de4e48514fc47aeb4ca95cd4091e2a333fbe9e1
Date: Tue Jan 24 15:35:45 2023 +0000
gdb/python: extend the Python Disassembler API to allow for styling
will fail when GDB is built with Python 3.6 or earlier. This is
because the error that is emitted when a function argument is missing
changed in Python 3.7, instead of an error like this:
Python Exception <class 'TypeError'>: function missing required argument 'style' (pos 1)
earlier versions of Python emit:
Python Exception <class 'TypeError'>: Required argument 'style' (pos 1) not found
and the new tests didn't allow for this.
This commit fixes this by allowing either pattern. I've tested this
building GDB against Python 3.7.9 and 3.6.15, with this commit all
tests in gdb.python/py-disasm.exp now pass.