90230fb
From f6756e8367757301d095dc35fbe477f234ba20d1 Mon Sep 17 00:00:00 2001
90230fb
From: Cole Robinson <crobinso@redhat.com>
90230fb
Date: Tue, 25 Feb 2014 14:54:06 -0500
90230fb
Subject: [PATCH] Don't forbid object names that are only all numbers (bz
90230fb
 1067127)
90230fb
90230fb
Just let libvirt error, since in the case of things like storage pools
90230fb
this is totally legitimate.
90230fb
90230fb
(cherry picked from commit 3efbefe91a1ec23cbcf3d4f5a72a02fab87daa83)
90230fb
---
90230fb
 virtinst/util.py | 4 ----
90230fb
 1 file changed, 4 deletions(-)
90230fb
90230fb
diff --git a/virtinst/util.py b/virtinst/util.py
90230fb
index 31ccd38..2fe00d3 100644
90230fb
--- a/virtinst/util.py
90230fb
+++ b/virtinst/util.py
90230fb
@@ -140,10 +140,6 @@ def validate_uuid(val):
90230fb
 
90230fb
 
90230fb
 def validate_name(name_type, val):
90230fb
-    if re.match("^[0-9]+$", val):
90230fb
-        raise ValueError(_("%s name can not be only numeric characters") %
90230fb
-                          name_type)
90230fb
-
90230fb
     # Rather than try and match libvirt's regex, just forbid things we
90230fb
     # know don't work
90230fb
     forbid = [" "]