From 970897ce845bf6722e237b322fd58f9ae2609304 Mon Sep 17 00:00:00 2001 From: Colin Patrick McCabe Date: Wed, 25 May 2011 15:21:37 -0700 Subject: [PATCH] pybind/rados.py: throw NoData on ENODATA Signed-off-by: Colin McCabe --- src/pybind/rados.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/pybind/rados.py b/src/pybind/rados.py index 1d487eb6de33d..43582c5d1497a 100755 --- a/src/pybind/rados.py +++ b/src/pybind/rados.py @@ -23,6 +23,9 @@ class PermissionError(Exception): class ObjectNotFound(Exception): pass +class NoData(Exception): + pass + class ObjectExists(Exception): pass @@ -56,6 +59,8 @@ def make_ex(ret, msg): return NoSpace(msg) elif (ret == errno.EEXIST): return ObjectExists(msg) + elif (ret == errno.ENODATA): + return NoData(msg) else: return Error(msg + (": error code %d" % ret)) -- 2.39.5