From: Rishabh Dave Date: Mon, 6 Oct 2025 10:43:31 +0000 (+0530) Subject: qa/cephfs: don't return defined variable X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2ab8933c177517a1503341356ed9cbdd401014f9;p=ceph.git qa/cephfs: don't return defined variable 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 --- diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index 35d7c630dff..30a115393c3 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -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()