]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/rados.py: improve error output 1163/head
authorYehuda Sadeh <yehuda@inktank.com>
Thu, 30 Jan 2014 00:05:17 +0000 (16:05 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Thu, 30 Jan 2014 00:20:55 +0000 (16:20 -0800)
Fixes: 7264
When failing to load librados, output the exception.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/pybind/rados.py

index a27fa02e3f003c36e3d5cb39a862f15284401841..0989ebb2e7e7a09ddfa1aabb675ca836537625c1 100644 (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: