diff options
Diffstat (limited to 'src/pybind/rbd.py')
-rw-r--r-- | src/pybind/rbd.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pybind/rbd.py b/src/pybind/rbd.py index f4d844a17ec..4ce1a0e819b 100644 --- a/src/pybind/rbd.py +++ b/src/pybind/rbd.py @@ -68,6 +68,9 @@ class FunctionNotSupported(Error): class ArgumentOutOfRange(Error): pass +class ConnectionShutdown(Error): + pass + def make_ex(ret, msg): """ Translate a librbd return code into an exception. @@ -89,7 +92,8 @@ def make_ex(ret, msg): errno.EBUSY : ImageBusy, errno.ENOTEMPTY : ImageHasSnapshots, errno.ENOSYS : FunctionNotSupported, - errno.EDOM : ArgumentOutOfRange + errno.EDOM : ArgumentOutOfRange, + errno.ESHUTDOWN : ConnectionShutdown } ret = abs(ret) if ret in errors: |