[dts] [patch V1] alter the regular expression format of hostfwd value
lihong
lihongx.ma at intel.com
Mon May 13 02:29:04 CEST 2019
Signed-off-by: lihong <lihongx.ma at intel.com>
---
framework/qemu_kvm.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/framework/qemu_kvm.py b/framework/qemu_kvm.py
index c3e8f37..80a39c8 100644
--- a/framework/qemu_kvm.py
+++ b/framework/qemu_kvm.py
@@ -562,7 +562,7 @@ class QEMUKvm(VirtBase):
Use regular expression to check if hostfwd value format is correct.
"""
regx_ip = '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}'
- regx_hostfwd = r'["tcp" | "udp"]?:%s?:\d+-%s?:\d+' % (regx_ip, regx_ip)
+ regx_hostfwd = r'(tcp|udp)?:(%s)?:\d+-(%s)?:\d+' % (regx_ip, regx_ip)
if not re.match(regx_hostfwd, opt_hostfwd):
raise Exception("Option opt_hostfwd format is not correct,\n" +
"it is %s,\n " % opt_hostfwd +
--
2.7.4
More information about the dts
mailing list