aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2023-08-31 12:29:32 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-08-31 13:16:02 +0000
commitdc391f14cc53c39ae984e925f91bcdf8ca94ebde (patch)
treea7a61c91e3715ed65d87e9064ebcf196501bcebb
parent7252c524eeba7d4e15100c1a5f1c717d17e9fe23 (diff)
pytest: Fix a small glitch in _mod_uses_pyside
_mod_uses_pyside did not check all errors, intentionally. No idea what was the problem, printing did not work. Fixed by an all Exception case. Change-Id: If509bcc1ccc9de43d56f8a3064944e38dd8b5387 Fixes: PYSIDE-2393 Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit 8adc38c478bf3709dfa79ddff1d613dc418a9d02) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--sources/shiboken6/shibokenmodule/files.dir/shibokensupport/feature.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/feature.py b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/feature.py
index 5c8364cf1..77d65caea 100644
--- a/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/feature.py
+++ b/sources/shiboken6/shibokenmodule/files.dir/shibokensupport/feature.py
@@ -158,6 +158,9 @@ def _mod_uses_pyside(module):
# This is undocumented and a Python error, seen in Python 3.10.2 on Windows,
# importing `pythoncom` of the win32 package.
return False
+ except Exception:
+ # PYSIDE-2393: pytest behaves weird when allowing any other error.
+ return False
return "PySide6" in source