]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/volumes: remove unneeded assignment to `NoneType`
authorMichael Fritch <mfritch@suse.com>
Tue, 3 Mar 2020 15:22:48 +0000 (08:22 -0700)
committerMichael Fritch <mfritch@suse.com>
Thu, 5 Mar 2020 20:19:34 +0000 (13:19 -0700)
fixes mypy error:

volumes/fs/operations/versions/__init__.py: note: In member "get_subvolume_object" of class "SubvolumeLoader":
volumes/fs/operations/versions/__init__.py:70: error: Incompatible types in assignment (expression has type "None", variable has type "SubvolumeBase")

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 25dd2d91a921a5c26a872f565db39589515a0329..f79631b04990b51c858bb493dedc4dfcfd161a85 100644 (file)
@@ -67,7 +67,6 @@ class SubvolumeLoader(object):
         except MetadataMgrException as me:
             if me.errno == -errno.ENOENT and upgrade:
                 self.upgrade_legacy_subvolume(fs, subvolume)
-                subvolume = None
                 return self.get_subvolume_object(fs, vol_spec, group, subvolname, upgrade=False)
             else:
                 # log the actual error and generalize error string returned to user