From: Michael Fritch Date: Tue, 3 Mar 2020 15:22:57 +0000 (-0700) Subject: mgr/volumes: OpSmException.error -> OpSmException.errno X-Git-Tag: v14.2.10~189^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=97bea5d68cfbc69351d8552e00e0c07b3fbf7b92;p=ceph.git mgr/volumes: OpSmException.error -> OpSmException.errno fixes mypy errors: volumes/fs/async_cloner.py: note: In function "handle_clone_pending": volumes/fs/async_cloner.py:71: error: "OpSmException" has no attribute "error"; maybe "errno"? volumes/fs/async_cloner.py: note: In function "handle_clone_in_progress": volumes/fs/async_cloner.py:139: error: "OpSmException" has no attribute "error"; maybe "errno"? Fixes: https://tracker.ceph.com/issues/44393 Signed-off-by: Michael Fritch (cherry picked from commit 7fa4da445650fd4a9f799c48ba513cb6f1a0d26c) --- diff --git a/src/pybind/mgr/volumes/fs/async_cloner.py b/src/pybind/mgr/volumes/fs/async_cloner.py index 595bd5dd0783..a0802fb92812 100644 --- a/src/pybind/mgr/volumes/fs/async_cloner.py +++ b/src/pybind/mgr/volumes/fs/async_cloner.py @@ -68,7 +68,7 @@ def handle_clone_pending(volume_client, volname, index, groupname, subvolname, s try: next_state = OpSm.get_next_state("clone", "pending", 0) except OpSmException as oe: - raise VolumeException(oe.error, oe.error_str) + raise VolumeException(oe.errno, oe.error_str) return (next_state, False) def sync_attrs(fs_handle, target_path, source_statx): @@ -159,7 +159,7 @@ def handle_clone_in_progress(volume_client, volname, index, groupname, subvolnam # jump to failed state next_state = OpSm.get_next_state("clone", "in-progress", -1) except OpSmException as oe: - raise VolumeException(oe.error, oe.error_str) + raise VolumeException(oe.errno, oe.error_str) return (next_state, False) def handle_clone_failed(volume_client, volname, index, groupname, subvolname, should_cancel):