Don't add header if it's not needed
This commit is contained in:
@@ -33,11 +33,11 @@ def start_list_exchanges(args: Dict[str, Any]) -> None:
|
|||||||
else:
|
else:
|
||||||
headers = {
|
headers = {
|
||||||
'name': 'Exchange name',
|
'name': 'Exchange name',
|
||||||
'valid': 'Valid',
|
|
||||||
'supported': 'Supported',
|
'supported': 'Supported',
|
||||||
'trade_modes': 'Markets',
|
'trade_modes': 'Markets',
|
||||||
'comment': 'Reason',
|
'comment': 'Reason',
|
||||||
}
|
}
|
||||||
|
headers.update({'valid': 'Valid'} if args['list_exchanges_all'] else {})
|
||||||
|
|
||||||
def build_entry(exchange: ValidExchangesType, valid: bool):
|
def build_entry(exchange: ValidExchangesType, valid: bool):
|
||||||
valid_entry = {'valid': exchange['valid']} if valid else {}
|
valid_entry = {'valid': exchange['valid']} if valid else {}
|
||||||
|
|||||||
Reference in New Issue
Block a user