comparison mercurial/utils/compression.py @ 50936:93b0de7f13ca

compression: use sysstr to specify attribute to fetch for priority These are attributes so they should be `str`.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Sep 2023 12:11:11 +0200
parents 642e31cb55f0
children d718eddf01d9
comparison
equal deleted inserted replaced
50935:f6cb926d4189 50936:93b0de7f13ca
183 If ``onlyavailable`` is set, filter out engines that can't be 183 If ``onlyavailable`` is set, filter out engines that can't be
184 loaded. 184 loaded.
185 """ 185 """
186 assert role in (SERVERROLE, CLIENTROLE) 186 assert role in (SERVERROLE, CLIENTROLE)
187 187
188 attr = b'serverpriority' if role == SERVERROLE else b'clientpriority' 188 attr = 'serverpriority' if role == SERVERROLE else 'clientpriority'
189 189
190 engines = [self._engines[e] for e in self._wiretypes.values()] 190 engines = [self._engines[e] for e in self._wiretypes.values()]
191 if onlyavailable: 191 if onlyavailable:
192 engines = [e for e in engines if e.available()] 192 engines = [e for e in engines if e.available()]
193 193