Fixed pair removal failure in remove_pair_from_config
This commit is contained in:
parent
7b19aaa11f
commit
130b1232c6
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue