def _factory(self, weak, path=None): if path is None: path = os.path.join(self.repos_path, '.git') return StorageFactory(path, self.env.log, weak)