提交 18522920 编写于 作者: N Narasimhan V

Fixed the regex to find PV name

Added '-' to regex which searches for pv name from the output
of 'pvs' command.
Signed-off-by: NNarasimhan V <sim@linux.vnet.ibm.com>
上级 5b0be41a
......@@ -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.
先完成此消息的编辑!
想要评论请 注册