Revision: 16884
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16884
Author:   campbellbarton
Date:     2008-10-02 18:59:08 +0200 (Thu, 02 Oct 2008)

Log Message:
-----------
blender would crash if the "sys" module didnt import, now just give a warning 
and continue.

Modified Paths:
--------------
    trunk/blender/source/blender/python/BPY_interface.c

Modified: trunk/blender/source/blender/python/BPY_interface.c
===================================================================
--- trunk/blender/source/blender/python/BPY_interface.c 2008-10-02 16:52:39 UTC 
(rev 16883)
+++ trunk/blender/source/blender/python/BPY_interface.c 2008-10-02 16:59:08 UTC 
(rev 16884)
@@ -306,13 +306,15 @@
                ok = 0;
        }
        
-       if (PySequence_Contains(path, dir)==0) { /* Only add if we need to */
+       if (ok && PySequence_Contains(path, dir)==0) { /* Only add if we need 
to */
                if (ok && PyList_Append( path, dir ) != 0) /* decref below */
                        ok = 0; /* append failed */
+       }
        
-               if( (ok==0) || PyErr_Occurred(  ) )
-                       Py_FatalError( "could import or build sys.path, can't 
continue" );
-       }
+       if( (ok==0) || PyErr_Occurred(  ) )
+               fprintf(stderr, "could import or build sys.path\n" );
+       
+       PyErr_Clear()
        Py_DECREF( dir );
        Py_XDECREF( mod_sys );
 }


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to