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
This commit is contained in:
Kent Mein 2011-08-03 17:58:06 +00:00
parent 9eef0646d4
commit 79c87852d2

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