]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind: improve EnvironmentError output 1170/head
authorIlya Dryomov <ilya.dryomov@inktank.com>
Thu, 30 Jan 2014 21:04:12 +0000 (23:04 +0200)
committerIlya Dryomov <ilya.dryomov@inktank.com>
Thu, 30 Jan 2014 21:04:12 +0000 (23:04 +0200)
Follow 70c7c9e600c5 ("pybind/rados.py: improve error output") and
improve EnvironmentError output for librbd and libcephfs too.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
src/pybind/cephfs.py
src/pybind/rbd.py

index a5e9153a020c05e69580c7289d0328abd904d739..13a826254fce91958fd0de8ae2b9c01f066ec6d3 100644 (file)
@@ -127,8 +127,8 @@ def load_libcephfs():
     # in addition, it doesn't seem work on centos 6.4 (see e46d2ca067b5)
     try:
         return CDLL('libcephfs.so.1')
-    except OSError:
-        raise EnvironmentError("Unable to find libcephfs")
+    except OSError as e:
+        raise EnvironmentError("Unable to load libcephfs: %s" % e)
 
 class LibCephFS(object):
     """libcephfs python wrapper"""
index 26c8df296e03d57a27ecee2ef66513c680fddb2b..97fa9ab609c70a44dce5e3c0e648739102c92fd0 100644 (file)
@@ -129,8 +129,8 @@ def load_librbd():
     # in addition, it doesn't seem work on centos 6.4 (see e46d2ca067b5)
     try:
         return CDLL('librbd.so.1')
-    except OSError:
-        raise EnvironmentError("Unable to find librbd")
+    except OSError as e:
+        raise EnvironmentError("Unable to load librbd: %s" % e)
 
 class RBD(object):
     """