From 2a29a80ea159b60bf107e0abbedfbdaf6dc680be Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Thu, 21 Dec 2017 17:04:36 -0500 Subject: [PATCH] avocado/utils/lv_utils.py: use the CmdException correct attribute name It doesn't have a 'result_obj' attribute, but it does have a `result` attribute which should be an instance of `avocado.utils.process.CmdResult`. Signed-off-by: Cleber Rosa --- avocado/utils/lv_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avocado/utils/lv_utils.py b/avocado/utils/lv_utils.py index 47ab1fb4..2640dc34 100644 --- a/avocado/utils/lv_utils.py +++ b/avocado/utils/lv_utils.py @@ -444,7 +444,7 @@ def lv_take_snapshot(vg_name, lv_name, process.run(cmd, sudo=True) except process.CmdError as ex: if ('Logical volume "%s" already exists in volume group "%s"' - % (lv_snapshot_name, vg_name) in ex.result_obj.stderr and + % (lv_snapshot_name, vg_name) in ex.result.stderr and re.search(re.escape(lv_snapshot_name + " [active]"), process.run("lvdisplay", sudo=True).stdout)): # the above conditions detect if merge of snapshot was postponed -- GitLab