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)
|
||||||
|
|
||||||
|
if groupedpair:
|
||||||
print(tabulate([(pair, ', '.join(timeframes)) for pair, timeframes in groupedpair.items()],
|
print(tabulate([(pair, ', '.join(timeframes)) for pair, timeframes in groupedpair.items()],
|
||||||
headers=("Pair", "Timeframe"),
|
headers=("Pair", "Timeframe"),
|
||||||
tablefmt='psql', stralign='right'))
|
tablefmt='psql', stralign='right'))
|
||||||
|
Loading…
Reference in New Issue
Block a user