Do not verify the backlist if it is empty

This commit is contained in:
mrpabloyeah
2025-09-09 19:24:32 +02:00
parent 3bce9278bd
commit 43be752847

View File

@@ -157,16 +157,17 @@ class PairListManager(LoggingMixin):
:param logmethod: Function that'll be called, `logger.info` or `logger.warning`. :param logmethod: Function that'll be called, `logger.info` or `logger.warning`.
:return: pairlist - blacklisted pairs :return: pairlist - blacklisted pairs
""" """
try: if self._blacklist:
blacklist = self.expanded_blacklist try:
except ValueError as err: blacklist = self.expanded_blacklist
logger.error(f"Pair blacklist contains an invalid Wildcard: {err}") except ValueError as err:
return [] logger.error(f"Pair blacklist contains an invalid Wildcard: {err}")
log_once = partial(self.log_once, logmethod=logmethod) return []
for pair in pairlist.copy(): log_once = partial(self.log_once, logmethod=logmethod)
if pair in blacklist: for pair in pairlist.copy():
log_once(f"Pair {pair} in your blacklist. Removing it from whitelist...") if pair in blacklist:
pairlist.remove(pair) log_once(f"Pair {pair} in your blacklist. Removing it from whitelist...")
pairlist.remove(pair)
return pairlist return pairlist
def verify_whitelist( def verify_whitelist(