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")