From f56ccc1643965ca0e4e0e7cd9e2a89ae803b2340 Mon Sep 17 00:00:00 2001 From: Marc Lagrange Date: Fri, 9 Jan 2009 13:29:18 +0100 Subject: [PATCH] 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/ in () error: WMFS not running? Signed-off-by: Marc Lagrange --- python/libwmfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/libwmfs.c b/python/libwmfs.c index f410cbc..7ccd9ed 100644 --- a/python/libwmfs.c +++ b/python/libwmfs.c @@ -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);