Skip to content

Commit

Permalink
Use sys.exit instead of exit (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
valefar-on-discord authored Sep 29, 2024
1 parent 5b5f4b5 commit f31644f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion ethstaker_deposit/cli/exit_transaction_keystore.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import click
import os
import sys
import time
from typing import Any, Optional

Expand Down Expand Up @@ -117,7 +118,7 @@ def exit_transaction_keystore(
secret_bytes = keystore.decrypt(keystore_password)
except ValueError:
click.echo(load_text(['arg_exit_transaction_keystore_keystore_password', 'mismatch']), err=True)
exit(1)
sys.exit(1)

signing_key = int.from_bytes(secret_bytes, 'big')

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import click
import os
import sys
import time
import click
from typing import Any, Optional

from eth_typing import HexAddress
Expand Down Expand Up @@ -132,7 +133,7 @@ def generate_bls_to_execution_change_keystore(
secret_bytes = keystore.decrypt(keystore_password)
except ValueError:
click.echo(load_text(['arg_bls_to_execution_changes_keystore_keystore_password', 'mismatch']), err=True)
exit(1)
sys.exit(1)

signing_key = int.from_bytes(secret_bytes, 'big')

Expand Down
3 changes: 2 additions & 1 deletion ethstaker_deposit/cli/partial_deposit.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import click
import os
import sys
import time

from eth_typing import HexAddress
Expand Down Expand Up @@ -139,7 +140,7 @@ def partial_deposit(
secret_bytes = keystore.decrypt(keystore_password)
except ValueError:
click.echo(load_text(['arg_partial_deposit_keystore_password', 'mismatch']), err=True)
exit(1)
sys.exit(1)

signing_key = int.from_bytes(secret_bytes, 'big')

Expand Down
3 changes: 2 additions & 1 deletion ethstaker_deposit/cli/test_keystore.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import click
import sys
from typing import Any

from ethstaker_deposit.key_handling.keystore import Keystore
Expand Down Expand Up @@ -54,7 +55,7 @@ def test_keystore(
keystore.decrypt(keystore_password)
except ValueError:
click.echo(load_text(['arg_test_keystore_keystore_password', 'mismatch']), err=True)
exit(1)
sys.exit(1)

click.echo(load_text(['msg_verification_success']))
if not config.non_interactive:
Expand Down

0 comments on commit f31644f

Please sign in to comment.