Fixed pair removal failure in remove_pair_from_config

This commit is contained in:
Nicolás Sánchez 2026-06-03 19:42:29 -03:00
parent 7b19aaa11f
commit 130b1232c6
1 changed files with 3 additions and 3 deletions

View File

@ -305,17 +305,17 @@ class Broker:
self.logger.log_this(f"Exception while reading the config file: {e}",1)
def add_pair_to_config(self,pair):
def add_pair_to_config(self, pair: str):
if pair not in self.broker_config["pairs"]:
self.broker_config["pairs"].append(pair)
return 0
return 1
def remove_pair_from_config(self,pair):
def remove_pair_from_config(self, pair: str):
try:
if pair in self.broker_config["pairs"]:
self.broker_config["pairs"].remove(pair)
self.broker_config["pairs"].remove(pair.replace("/",""))
return 0
self.logger.log_this("Pair does not exist - Can't remove from read_config",1,pair)
return 2