]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/volumes: reverse params passed to `isinstace()`
authorMichael Fritch <mfritch@suse.com>
Tue, 3 Mar 2020 15:18:43 +0000 (08:18 -0700)
committerMichael Fritch <mfritch@suse.com>
Thu, 5 Mar 2020 20:19:32 +0000 (13:19 -0700)
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 <mfritch@suse.com>
src/pybind/mgr/volumes/fs/operations/clone_index.py

index c15fb54c79a0b10ad745798bd2d80c1b23e66439..068a97a9de58be47213c370ddbb53b9b99055b09 100644 (file)
@@ -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