def __init__(self, root_path=None, listen_addr=None, perm=None, *args, **kwargs): # Default values self.perm = perm or 'r' self.root_path = root_path or '/' self.listen_addr = listen_addr or 'localhost' # Backend backend = SubFileSystemBackend(self.root_path) # Handlers by permissions handlers = PERM_MAPPING.get(self.perm, READ_HANDLERS) # This is ugly and due to the fact that TCPGitServer is and old style class TCPGitServer.__init__(self, backend, self.listen_addr, handlers=handlers, *args, **kwargs)