From c884cc01d9eb5dcc500797d302d4bfeb26cb825d Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 8 Jun 2017 09:30:31 -0400 Subject: [PATCH] pybind/rbd: OSError should be picklable Fixes: http://tracker.ceph.com/issues/20223 Signed-off-by: Jason Dillaman --- src/pybind/rbd/rbd.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pybind/rbd/rbd.pyx b/src/pybind/rbd/rbd.pyx index 40c8843261d..ec090dba861 100644 --- a/src/pybind/rbd/rbd.pyx +++ b/src/pybind/rbd/rbd.pyx @@ -394,6 +394,8 @@ class OSError(Error): def __str__(self): return '[Errno {0}] {1}'.format(self.errno, self.strerror) + def __reduce__(self): + return (self.__class__, (self.errno, self.strerror)) class PermissionError(OSError): pass -- 2.39.5