]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
pybind/rbd: OSError should be picklable 15574/head
authorJason Dillaman <dillaman@redhat.com>
Thu, 8 Jun 2017 13:30:31 +0000 (09:30 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 8 Jun 2017 13:30:31 +0000 (09:30 -0400)
Fixes: http://tracker.ceph.com/issues/20223
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/pybind/rbd/rbd.pyx

index 40c8843261dfa6b09f11c1cd3faee02c9e4102e7..ec090dba86190ab706d47754099585a2148fb34f 100644 (file)
@@ -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