avocado.utils.lv_utils: Fix the pvs regexp

The "pvs" command adjusts to tablular output, therefor it can contain
several emply ' 's, minimum 1.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 39030554
......@@ -153,7 +153,7 @@ def vg_ramdisk_cleanup(ramdisk_filename=None, vg_ramdisk_dir=None,
"""
errs = []
if vg_name is not None:
loop_device = re.search(r"([/\w]+) %s lvm2" % vg_name,
loop_device = re.search(r"([/\w]+) +%s +lvm2" % vg_name,
process.run("pvs", sudo=True).stdout)
if loop_device is not None:
loop_device = loop_device.group(1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册