forked from bartvdbraak/blender
quiet harmless py resource warning - file opened but not closed.
This commit is contained in:
parent
cc0ec3aa33
commit
24acf58fc4
@ -545,9 +545,11 @@ class WM_OT_keyconfig_import(bpy.types.Operator):
|
||||
if not self.filepath:
|
||||
raise Exception("Filepath not set")
|
||||
|
||||
# simply check we can open
|
||||
f = open(self.filepath, "r")
|
||||
if not f:
|
||||
raise Exception("Could not open file")
|
||||
f.close()
|
||||
|
||||
config_name = basename(self.filepath)
|
||||
|
||||
|
@ -277,7 +277,7 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
|
||||
case UI_ID_ALONE:
|
||||
if(id) {
|
||||
const int do_scene_obj= (GS(id->name) == ID_OB) &&
|
||||
(template->ptr.type == &RNA_SceneObjects);
|
||||
(template->ptr.type == &RNA_SceneObjects);
|
||||
|
||||
/* make copy */
|
||||
if(do_scene_obj) {
|
||||
|
Loading…
Reference in New Issue
Block a user