From 896448324f35bb1c307baff46e67a05d5d23e83b Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Tue, 3 Mar 2020 08:18:43 -0700 Subject: [PATCH] mgr/volumes: reverse params passed to `isinstace()` fixes mypy error: volumes/fs/operations/clone_index.py: note: In member "track" of class "CloneIndex": volumes/fs/operations/clone_index.py:38: error: Argument 2 to "isinstance" has incompatible type "Union[VolumeException, Any]"; expected "Union[type, Tuple[Union[type, Tuple[Any, ...]], ...]]" Fixes: https://tracker.ceph.com/issues/44393 Signed-off-by: Michael Fritch --- src/pybind/mgr/volumes/fs/operations/clone_index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/volumes/fs/operations/clone_index.py b/src/pybind/mgr/volumes/fs/operations/clone_index.py index c15fb54c79a..068a97a9de5 100644 --- a/src/pybind/mgr/volumes/fs/operations/clone_index.py +++ b/src/pybind/mgr/volumes/fs/operations/clone_index.py @@ -35,7 +35,7 @@ class CloneIndex(Index): except (VolumeException, cephfs.Error) as e: if isinstance(e, cephfs.Error): e = IndexException(-e.args[0], e.args[1]) - elif isinstance(VolumeException, e): + elif isinstance(e, VolumeException): e = IndexException(e.errno, e.error_str) raise e -- 2.39.5