1
0
mirror of https://github.com/ceph/ceph synced 2024-12-24 20:33:27 +00:00

pybind/rados.py: improve error output

Fixes: 7264

When failing to load librados, output the exception.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
This commit is contained in:
Yehuda Sadeh 2014-01-29 16:05:17 -08:00
parent 3a39f363ef
commit 70c7c9e600

View File

@ -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: