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_ui/space_userpref_keymap.py')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref_keymap.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py
index 8fed3a934d9..585c3cffcb9 100644
--- a/release/scripts/startup/bl_ui/space_userpref_keymap.py
+++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py
@@ -592,6 +592,9 @@ class WM_OT_keyconfig_export(bpy.types.Operator):
if not self.filepath:
raise Exception("Filepath not set")
+ if not self.filepath.endswith('.py'):
+ self.filepath += '.py'
+
f = open(self.filepath, "w")
if not f:
raise Exception("Could not open file")