[virt-tools-list] [virt-manager PATCH] numatune: fix validate_cpuset regexp
Pavel Hrdina
phrdina at redhat.com
Tue May 22 17:07:19 UTC 2018
Character '-' needs to be escaped in a set of characters.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1566818
Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
Pushed under trivial rule.
virtinst/domain/numatune.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/virtinst/domain/numatune.py b/virtinst/domain/numatune.py
index 6d65ee7a..0e34a48d 100644
--- a/virtinst/domain/numatune.py
+++ b/virtinst/domain/numatune.py
@@ -31,7 +31,7 @@ class DomainNumatune(XMLBuilder):
if not isinstance(val, str) or len(val) == 0:
raise ValueError(_("cpuset must be string"))
- if re.match("^[0-9,-^]*$", val) is None:
+ if re.match("^[0-9,\-^]*$", val) is None:
raise ValueError(_("cpuset can only contain numeric, ',', '^', or "
"'-' characters"))
--
2.17.0
More information about the virt-tools-list
mailing list