hg-ssh
changeset 7 2935e7232bd3
parent 5 6fc5eab8ae58
child 10 524b4a45ef0a
equal deleted inserted replaced
6:505d4789f91c 7:2935e7232bd3
    50         fail("Bad glob pattern in auth config: %s" % pattern)
    50         fail("Bad glob pattern in auth config: %s" % pattern)
    51     pattern = pattern.replace(".", r'\.')
    51     pattern = pattern.replace(".", r'\.')
    52     pattern = pattern.replace("*", "[%s]*" % allowedchars)
    52     pattern = pattern.replace("*", "[%s]*" % allowedchars)
    53     return re.compile(pattern + "$").match(match) is not None
    53     return re.compile(pattern + "$").match(match) is not None
    54 
    54 
    55 def testrule(rulefile keyname, path, applicable):
    55 def testrule(rulefile, keyname, path, applicable):
    56     goodpath(keyname)
    56     goodpath(keyname)
    57     goodpath(path)
    57     goodpath(path)
    58     f = open(rulefile)
    58     f = open(rulefile)
    59     try:
    59     try:
    60         for l in f:
    60         for l in f: