diff --git a/avocado/utils/lv_utils.py b/avocado/utils/lv_utils.py index 47ab1fb4b3e59a295b79b8cd08c432983cbcff35..2640dc349995565232969e718875c780de47e7e4 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