def __init__(self, path, allowance): if path == '' and not allowance: # an empty value means allow all allowance = True self.path = urllib.quote(path) self.allowance = allowance