]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/volumes: add missing error code
authorMichael Fritch <mfritch@suse.com>
Tue, 3 Mar 2020 15:21:54 +0000 (08:21 -0700)
committerMichael Fritch <mfritch@suse.com>
Thu, 5 Mar 2020 20:19:33 +0000 (13:19 -0700)
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 <mfritch@suse.com>
src/pybind/mgr/volumes/fs/operations/versions/__init__.py

index ddf2789a1770c70a0814bfd88ab1ba4a2138e466..68c877b03b9f7c3687a9826037807663c03a5abd 100644 (file)
@@ -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):