From 22b4cb9405051b6ea17f76dac85a117b1ab34a41 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Tue, 3 Mar 2020 08:21:54 -0700 Subject: [PATCH] mgr/volumes: add missing error code fixes mypy error: volumes/fs/operations/versions/__init__.py: note: In member "_load_supported_versions" of class "SubvolumeLoader": volumes/fs/operations/versions/__init__.py:35: error: Too few arguments for "VolumeException" Fixes: https://tracker.ceph.com/issues/44393 Signed-off-by: Michael Fritch --- src/pybind/mgr/volumes/fs/operations/versions/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/volumes/fs/operations/versions/__init__.py b/src/pybind/mgr/volumes/fs/operations/versions/__init__.py index ddf2789a177..68c877b03b9 100644 --- a/src/pybind/mgr/volumes/fs/operations/versions/__init__.py +++ b/src/pybind/mgr/volumes/fs/operations/versions/__init__.py @@ -32,7 +32,7 @@ class SubvolumeLoader(object): self.max_version = cls.version() self.versions[cls.version()] = cls if self.max_version == SubvolumeLoader.INVALID_VERSION: - raise VolumeException("no subvolume version available") + raise VolumeException(-errno.EINVAL, "no subvolume version available") log.info("max subvolume version is v{0}".format(self.max_version)) def _get_subvolume_version(self, version): -- 2.39.5