diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-04-22 09:59:37 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-04-28 13:27:33 +0300 |
commit | 4adc68bdf872c7fa1deb116159b623d689542112 (patch) | |
tree | 598b3a8186d4b75ae4810515fe64368e574178a1 /release/scripts/startup/bl_operators | |
parent | 90f01d50484c75068851fa11263df60cdbd57f2b (diff) |
Fix T75973: don't show raw Python errors to users for invalid shortcut paths
There are cases when a user can accidentally assign an operator to toggle an
invalid property to e.g. left click, which shows Python errors to the users.
Rather than throw an error and e.g. break 3D viewport selection for the user,
just print an error to the console.
The root cause of such bugs should be fixed as well, but a working Blender
is most important here.
Diffstat (limited to 'release/scripts/startup/bl_operators')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 8c97157f234..70d958b9bc8 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -87,8 +87,10 @@ def context_path_validate(context, data_path): # One of the items in the rna path is None, just ignore this value = Ellipsis else: - # We have a real error in the rna path, don't ignore that - raise + # Print invalid path, but don't show error to the users and fully + # break the UI if the operator is bound to an event like left click. + print("context_path_validate error: context.%s not found (invalid keymap entry?)" % data_path) + value = Ellipsis return value |