def _setupShim(self, log = None, authToken = None):
        if authToken is None:
            authToken = ( 'anonymous', 'anonymous', None, None )

        self.openRepository()
        testserver = self.servers.getServer()

        cfg = netserver.ServerConfig()
        cfg.serverName = testserver.getName()
        cfg.tmpDir = self.tmpDir
        cfg.contentsDir = ('legacy', [testserver.contents.getPath()])
        cfg.configLine(testserver.reposDB.getDriver() %'repositoryDB %s')

        server = shimclient.NetworkRepositoryServer(cfg,
                self.cfg.repositoryMap['localhost'])

        if log:
            os.environ['CONARY_CLIENT_LOG'] = log

        # remove localhost from the map; we don't need it since this is a shim
        cliCfg = copy.copy(self.cfg)
        rm = conarycfg.RepoMap()
        for host, url in self.cfg.repositoryMap:
            if host != 'localhost':
                rm.append((host, url))
        cliCfg.repositoryMap = rm
        shim = shimclient.ShimNetClient(server, 'http', 80, authToken, cliCfg)

        if log:
            del os.environ['CONARY_CLIENT_LOG']

        return shim, cfg
dataset/ETHPy150Open sassoftware/conary/conary_test/shimtest.py/ShimNetClientTest._setupShim/swapped operands of `%`