From: Jason Dillaman Date: Thu, 8 Jun 2017 13:30:31 +0000 (-0400) Subject: pybind/rbd: OSError should be picklable X-Git-Tag: v12.1.0~188^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c884cc01d9eb5dcc500797d302d4bfeb26cb825d;p=ceph.git pybind/rbd: OSError should be picklable Fixes: http://tracker.ceph.com/issues/20223 Signed-off-by: Jason Dillaman --- diff --git a/src/pybind/rbd/rbd.pyx b/src/pybind/rbd/rbd.pyx index 40c8843261df..ec090dba8619 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