提交 2a29a80e 编写于 作者: C Cleber Rosa

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: NCleber Rosa <crosa@redhat.com>
上级 0fdb1db6
...@@ -444,7 +444,7 @@ def lv_take_snapshot(vg_name, lv_name, ...@@ -444,7 +444,7 @@ def lv_take_snapshot(vg_name, lv_name,
process.run(cmd, sudo=True) process.run(cmd, sudo=True)
except process.CmdError as ex: except process.CmdError as ex:
if ('Logical volume "%s" already exists in volume group "%s"' 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]"), re.search(re.escape(lv_snapshot_name + " [active]"),
process.run("lvdisplay", sudo=True).stdout)): process.run("lvdisplay", sudo=True).stdout)):
# the above conditions detect if merge of snapshot was postponed # the above conditions detect if merge of snapshot was postponed
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册