]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: don't return defined variable
authorRishabh Dave <ridave@redhat.com>
Mon, 6 Oct 2025 10:43:31 +0000 (16:13 +0530)
committerRishabh Dave <ridave@redhat.com>
Mon, 6 Oct 2025 12:37:18 +0000 (18:07 +0530)
If command in _run_umount_lf() fails and the is_mounted() turns to be
false, "proc" is returned by this method even though it is undefined (it
won't be defined by try clause fails leading the control to jump from
try to except without defining variable).

Fixes: https://tracker.ceph.com/issues/73374
Signed-off-by: Rishabh Dave <ridave@redhat.com>
qa/tasks/cephfs/mount.py

index 35d7c630dff2ae80337d7aeaba135dfad11a37fd..30a115393c3ab16f213492a39fb71cb00dbb25ea 100644 (file)
@@ -517,12 +517,11 @@ class CephFSMountBase(object):
             proc = self.client_remote.run(
                 args=f'sudo umount --lazy --force {self.hostfs_mntpt}',
                 timeout=UMOUNT_TIMEOUT, omit_sudo=False)
+            return proc
         except CommandFailedError:
             if self.is_mounted():
                 raise
 
-        return proc
-
     def umount(self):
         raise NotImplementedError()