[virt-manager PATCH] numatune: fix validate_cpuset regexp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---

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

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux