From 70c7c9e600c545c6809577e0f2cc45b77c9ccdec Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 29 Jan 2014 16:05:17 -0800 Subject: [PATCH] pybind/rados.py: improve error output Fixes: 7264 When failing to load librados, output the exception. Signed-off-by: Yehuda Sadeh --- src/pybind/rados.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind/rados.py b/src/pybind/rados.py index a27fa02e3f0..0989ebb2e7e 100644 --- a/src/pybind/rados.py +++ b/src/pybind/rados.py @@ -200,8 +200,8 @@ Rados object in state %s." % (self.state)) #maybe find_library can not find it correctly on all platforms. try: self.librados = CDLL('librados.so.2') - except OSError: - raise EnvironmentError("Unable to find librados") + except OSError as e: + raise EnvironmentError("Unable to load librados: %s" % e) except: raise Error("Unexpected error") else: