[et-mgmt-tools] [PATCH] domain name must not be numeric only

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

 



Hi,

The attached patch adds to check the domain name that must not be
numeric only.

Signed-off-by: Saori Fukuta <fukuta.saori@xxxxxxxxxxxxxx>

Thanks,
Saori Fukuta.

Index: virtinst/Guest.py (python-virtinst-0.100.0)
===================================================================
--- Guest.py    2007-02-21 11:04:43.000000000 +0900
+++ Guest.py.num        2007-02-21 11:10:28.000000000 +0900
@@ -204,6 +204,8 @@ class Guest(object):
         return self._name
     def set_name(self, val):
         # FIXME: need some validation here
+        if re.match("^[0-9]*$", val):
+            raise ValueError, "Domain name must not be numeric only"
         if re.match("^[a-zA-Z0-9_]*$", val) == None:
             raise ValueError, "Domain name must be alphanumeric or _"
         if len(val) > 50:



[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux