summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2022-01-21 08:57:10 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2022-01-21 19:54:13 +0100
commitdc2c590b1a325cd69a313c37c328e6691d4511f3 (patch)
tree3adc9fd813a860a11e59028fcf843bf909530507 /util
parentdd3ea45c232d18cd06fed9a380e2fc3a87fe5b8a (diff)
pro2cmake: Fix exception with newer pyparsing module
The pyparsing module's debug action properties have been renamed. Check the existence of the attributes before assigning. Change-Id: I8fff652304a0af215c56f54b63d613a1f6a5207a Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'util')
-rw-r--r--util/cmake/helper.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/util/cmake/helper.py b/util/cmake/helper.py
index 6de3b44593..34c702193f 100644
--- a/util/cmake/helper.py
+++ b/util/cmake/helper.py
@@ -929,6 +929,11 @@ def _set_up_py_parsing_nicer_debug_output(pp):
return wrapper_function
- pp._defaultStartDebugAction = increase_indent(pp._defaultStartDebugAction)
- pp._defaultSuccessDebugAction = decrease_indent(pp._defaultSuccessDebugAction)
- pp._defaultExceptionDebugAction = decrease_indent(pp._defaultExceptionDebugAction)
+ if hasattr(pp, "_defaultStartDebugAction"):
+ pp._defaultStartDebugAction = increase_indent(pp._defaultStartDebugAction)
+ pp._defaultSuccessDebugAction = decrease_indent(pp._defaultSuccessDebugAction)
+ pp._defaultExceptionDebugAction = decrease_indent(pp._defaultExceptionDebugAction)
+ elif hasattr(pp.core, "_default_start_debug_action"):
+ pp.core._default_start_debug_action = increase_indent(pp.core._default_start_debug_action)
+ pp.core._default_success_debug_action = decrease_indent(pp.core._default_success_debug_action)
+ pp.core._default_exception_debug_action = decrease_indent(pp.core._default_exception_debug_action)