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:
@@ -92,9 +92,9 @@ wmfs_init(PyObject *self, PyObject *args)
|
|||||||
/* Else, exit. */
|
/* Else, exit. */
|
||||||
if(!ret)
|
if(!ret)
|
||||||
{
|
{
|
||||||
fprintf(stderr, "WMFS is not running.\n");
|
|
||||||
XFree(ret);
|
XFree(ret);
|
||||||
exit(EXIT_FAILURE);
|
PyErr_SetString(WmfsInitError, "WMFS not running?");
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
XFree(ret);
|
XFree(ret);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user