##// END OF EJS Templates
compression: use sysstr to specify attribute to fetch for priority...
marmoute -
r51806:93b0de7f default
parent child Browse files
Show More
@@ -185,7 +185,7 b' class compressormanager:'
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:
@@ -367,9 +367,7 b' def supportedcompengines(ui, role):'
367 # No explicit config. Filter out the ones that aren't supposed to be
367 # No explicit config. Filter out the ones that aren't supposed to be
368 # advertised and return default ordering.
368 # advertised and return default ordering.
369 if not configengines:
369 if not configengines:
370 attr = (
370 attr = 'serverpriority' if role == util.SERVERROLE else 'clientpriority'
371 b'serverpriority' if role == util.SERVERROLE else b'clientpriority'
372 )
373 return [
371 return [
374 e for e in compengines if getattr(e.wireprotosupport(), attr) > 0
372 e for e in compengines if getattr(e.wireprotosupport(), attr) > 0
375 ]
373 ]
General Comments 0
You need to be logged in to leave comments. Login now