python: Add exception for wmfs.init()

if wmfs is not running, an exception is called like:
  In [2]: wmfs.init()
  ---------------------------------------------------------------------------
  error                                     Traceback (most recent call last)

  /usr/home/marc/<ipython console> in <module>()

  error: WMFS not running?

Signed-off-by: Marc Lagrange <marc@shebang.sangor>
This commit is contained in:
Marc Lagrange 2009-01-09 13:29:18 +01:00
parent c6f4f09967
commit f56ccc1643

View File

@ -92,9 +92,9 @@ wmfs_init(PyObject *self, PyObject *args)
/* Else, exit. */
if(!ret)
{
fprintf(stderr, "WMFS is not running.\n");
XFree(ret);
exit(EXIT_FAILURE);
PyErr_SetString(WmfsInitError, "WMFS not running?");
return NULL;
}
XFree(ret);