diff options
author | Kent Mein <mein@cs.umn.edu> | 2011-08-03 21:58:06 +0400 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2011-08-03 21:58:06 +0400 |
commit | 79c87852d2a2b07ba3cb411e00fd0fb4aaee008a (patch) | |
tree | 6addf06c6d986adf301bd1ca012d325dbaca9e51 /release | |
parent | 9eef0646d4fc5344e85e8e4eae63795ffd4b766b (diff) |
Add .py extension if it is missing from keymap file.
This is for bug #28141
While not really a bug, it makes it a lot easyer to use if it
has the exension. (Isn't hidden from the user when they try to load it...)
Kent
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref_keymap.py | 3 |
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") |