Using exception instead of empty return with print

pull/159/head
kompotkot 2021-08-24 15:42:00 +00:00
rodzic 6f0a224562
commit 6c7d0a783b
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -92,8 +92,7 @@ def ethcrawler_blocks_sync_handler(args: argparse.Namespace) -> None:
while True:
bottom_block_number, top_block_number = get_latest_blocks(args.confirmations)
if bottom_block_number is None:
print("Variable bottom_block_number can't be None")
return
raise Exception("Variable bottom_block_number can't be None")
bottom_block_number = max(bottom_block_number + 1, starting_block)
if bottom_block_number >= top_block_number:
print(