[mod_python] Small sugestion

Gregory Trubetskoy grisha at modpython.org
Thu Dec 21 09:55:48 EST 2000


Sorry Damjan, somehow this one fell out of my task list. It's a good
suggestion, I'll add it in.

Grisha

On Wed, 20 Dec 2000, Damjan wrote:

> > Hi, Grisha.
> > I've noticed a lot of complaints about that 'make_obcallback...' errors in the
> > apache log. These are very often problems with the python path.
> > So I sugest you add the following two lines in make_obcallback:
> > (Here is a diff against 2.6.3)
> > 
> > --- mod_python.c.bak	Mon Dec  4 10:59:15 2000
> > +++ mod_python.c	Fri Dec  8 19:47:41 2000
> > @@ -479,6 +479,8 @@
> >  
> >      if (! ((m = PyImport_ImportModule(MODULENAME)))) {
> >  	fprintf(stderr, "make_obcallback(): could not import %s.\n", MODULENAME);
> > +	fprintf(stderr, "make_obcallback(): %s not found in %s.\n", MODULENAME, Py_GetPath());
> > +	return NULL;
> >      }
> >      
> >      if (! ((obCallBack = PyObject_CallMethod(m, INITFUNC, NULL)))) {
> > 
> > The 'return NULL;' is for the make_obcallback to return as soon as posible 
> > (and there's no reason to try and call the method when the module was not
> > loaded), and the apache log will be cleaner.
> 
> No comments on this ??
> 
> 
> -- 
> Damjan Georgievski		|           Дамјан Георгиевски
> Skopje, Macedonia		|           Скопје, Македонија
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
> 




More information about the Mod_python mailing list