Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use sys.exit instead of exit #176

Merged
merged 1 commit into from
Sep 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading