Commit 6d8494ad authored by Devaev Maxim's avatar Devaev Maxim

Рефакторинг

parent 5f3916eb
......@@ -8,12 +8,12 @@ from common import ValidatorError
##### Public methods #####
def validUserName(arg) :
if re.match("^[a-z_][a-z0-9_-]*$", arg) == None :
if re.match(r"^[a-z_][a-z0-9_-]*$", arg) == None :
raise ValidatorError("Argument \"%s\" is not valid UNIX user name" % (arg))
return arg
def validGroupName(arg) :
if re.match("^[a-z_][a-z0-9_-]*$", arg) == None :
if re.match(r"^[a-z_][a-z0-9_-]*$", arg) == None :
raise ValidatorError("Argument \"%s\" is not valid UNIX group name" % (arg))
return arg
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment