Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/startup/bl_operators/wm.py')
-rw-r--r--release/scripts/startup/bl_operators/wm.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index a2a8c991259..9cd9131ec4b 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -1199,9 +1199,10 @@ class WM_OT_keyconfig_activate(Operator):
)
def execute(self, context):
- bpy.utils.keyconfig_set(self.filepath)
- return {'FINISHED'}
-
+ if bpy.utils.keyconfig_set(self.filepath, report=self.report):
+ return {'FINISHED'}
+ else:
+ return {'CANCELLED'}
class WM_OT_appconfig_default(Operator):
bl_idname = "wm.appconfig_default"
@@ -1386,9 +1387,10 @@ class WM_OT_keyconfig_import(Operator):
return {'CANCELLED'}
# sneaky way to check we're actually running the code.
- bpy.utils.keyconfig_set(path)
-
- return {'FINISHED'}
+ if bpy.utils.keyconfig_set(path, report=self.report):
+ return {'FINISHED'}
+ else:
+ return {'CANCELLED'}
def invoke(self, context, event):
wm = context.window_manager