kopia lustrzana https://github.com/bugout-dev/moonstream
Using exception instead of empty return with print
rodzic
6f0a224562
commit
6c7d0a783b
|
@ -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(
|
||||
|
|
Ładowanie…
Reference in New Issue