py api was raising SystemError exception incorrectly, this is intended for internal...
[blender.git] / source / blender / python / intern / bpy_interface.c
index 0e9532aa726b51599a108bc0aa96633815fe4d1e..d07e50398d977787005983bc6c997dbbbd6ab61a 100644 (file)
@@ -400,7 +400,7 @@ static int python_script_exec(bContext *C, const char *fn, struct Text *text, st
 #endif
                }
                else {
-                       PyErr_Format(PyExc_SystemError, "Python file \"%s\" could not be opened: %s", fn, strerror(errno));
+                       PyErr_Format(PyExc_IOError, "Python file \"%s\" could not be opened: %s", fn, strerror(errno));
                        py_result= NULL;
                }
        }