]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/volumes: use `volume_exception_to_retval` as a decorator
authorLeonid Usov <leonid.usov@ibm.com>
Thu, 4 Jan 2024 17:51:32 +0000 (19:51 +0200)
committerLeonid Usov <leonid.usov@ibm.com>
Thu, 14 Mar 2024 19:07:52 +0000 (15:07 -0400)
commit05bd946cad9ab369741fffa7c2e978a0bb074cb5
tree09bc02b8c9e7623a1247a0a305091ccff13f5b40
parentd65f8966c2d2e57946909266a74e2e10ad9730ea
mgr/volumes: use `volume_exception_to_retval` as a decorator

When used as a decorator, it saves one indented try-catch block inside the decorated method.
This can be applied to most of the methods in the file, subject to a separate refactoring commit

Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
(cherry picked from commit 78afc6136118e14e2cf6a5651bfe11777c9881a4)
src/pybind/mgr/volumes/fs/volume.py