summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f586c77)
svn path=/trunk/packages/sipb-xen-www/; revision=648
"""Check that name is valid for a machine name"""
if not name:
return False
"""Check that name is valid for a machine name"""
if not name:
return False
- charset = string.ascii_letters + string.digits + '-_'
- if name[0] in '-_' or len(name) > 22:
+ charset = string.lowercase + string.digits + '-'
+ if '-' in (name[0], name[-1]) or len(name) > 63:
return False
for x in name:
if x not in charset:
return False
for x in name:
if x not in charset: