summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoao Eduardo Luis <joao.luis@inktank.com>2013-10-23 02:54:34 +0100
committerJoao Eduardo Luis <joao.luis@inktank.com>2013-10-23 02:54:34 +0100
commit1a2e0ebaf1f9253ef91304456a64e53b610dc557 (patch)
tree19d9a16bf979ceaf5560801c139e5bb69ec16375
parent2d7ccab3824eeb9b133ceb5fe8d723f6a664221b (diff)
downloadceph-1a2e0ebaf1f9253ef91304456a64e53b610dc557.tar.gz
pybind: rados: support ETIMEDOUT on make_ex()
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
-rw-r--r--src/pybind/rados.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/pybind/rados.py b/src/pybind/rados.py
index d977c1a298a..0977bd08bce 100644
--- a/src/pybind/rados.py
+++ b/src/pybind/rados.py
@@ -67,6 +67,10 @@ class LogicError(Error):
""" `` class, derived from `Error` """
pass
+class TimedOut(Error):
+ """ `TimedOut` class, derived from `Error` """
+ pass
+
def make_ex(ret, msg):
"""
Translate a librados return code into an exception.
@@ -85,7 +89,8 @@ def make_ex(ret, msg):
errno.ENOSPC : NoSpace,
errno.EEXIST : ObjectExists,
errno.ENODATA : NoData,
- errno.EINTR : InterruptedOrTimeoutError
+ errno.EINTR : InterruptedOrTimeoutError,
+ errno.ETIMEDOUT : TimedOut
}
ret = abs(ret)
if ret in errors: