Don't print empty table
This commit is contained in:
parent
62c55b1863
commit
0228b63418
@ -113,6 +113,7 @@ def start_list_data(args: Dict[str, Any]) -> None:
|
|||||||
for pair, timeframe in sorted(paircombs, key=lambda x: (x[0], timeframe_to_minutes(x[1]))):
|
for pair, timeframe in sorted(paircombs, key=lambda x: (x[0], timeframe_to_minutes(x[1]))):
|
||||||
groupedpair[pair].append(timeframe)
|
groupedpair[pair].append(timeframe)
|
||||||
|
|
||||||
print(tabulate([(pair, ', '.join(timeframes)) for pair, timeframes in groupedpair.items()],
|
if groupedpair:
|
||||||
headers=("Pair", "Timeframe"),
|
print(tabulate([(pair, ', '.join(timeframes)) for pair, timeframes in groupedpair.items()],
|
||||||
tablefmt='psql', stralign='right'))
|
headers=("Pair", "Timeframe"),
|
||||||
|
tablefmt='psql', stralign='right'))
|
||||||
|
Loading…
Reference in New Issue
Block a user