equal
deleted
inserted
replaced
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: |