@@ -3798,11 +3798,11 @@ def stake_remove(
3798
3798
"Interactive mode cannot be used with hotkey selection options like "
3799
3799
"--include-hotkeys, --exclude-hotkeys, --all-hotkeys, or --hotkey."
3800
3800
)
3801
- raise typer . Exit ()
3801
+ return False
3802
3802
3803
3803
if unstake_all and unstake_all_alpha :
3804
3804
print_error ("Cannot specify both unstake-all and unstake-all-alpha." )
3805
- raise typer . Exit ()
3805
+ return False
3806
3806
3807
3807
if not interactive and not unstake_all and not unstake_all_alpha :
3808
3808
netuid = get_optional_netuid (netuid , all_netuids )
@@ -3811,19 +3811,19 @@ def stake_remove(
3811
3811
"You have specified hotkeys to include and also the `--all-hotkeys` flag. The flag"
3812
3812
" should only be used standalone (to use all hotkeys) or with `--exclude-hotkeys`."
3813
3813
)
3814
- raise typer . Exit ()
3814
+ return False
3815
3815
3816
3816
if include_hotkeys and exclude_hotkeys :
3817
3817
print_error (
3818
3818
"You have specified both including and excluding hotkeys options. Select one or the other."
3819
3819
)
3820
- raise typer . Exit ()
3820
+ return False
3821
3821
3822
3822
if unstake_all and amount :
3823
3823
print_error (
3824
3824
"Cannot specify both a specific amount and 'unstake-all'. Choose one or the other."
3825
3825
)
3826
- raise typer . Exit ()
3826
+ return False
3827
3827
3828
3828
if amount and amount <= 0 :
3829
3829
print_error (f"You entered an incorrect unstake amount: { amount } " )
@@ -3891,12 +3891,12 @@ def stake_remove(
3891
3891
if include_hotkeys :
3892
3892
if len (include_hotkeys ) > 1 :
3893
3893
print_error ("Cannot unstake_all from multiple hotkeys at once." )
3894
- raise typer . Exit ()
3894
+ return False
3895
3895
elif is_valid_ss58_address (include_hotkeys [0 ]):
3896
3896
hotkey_ss58_address = include_hotkeys [0 ]
3897
3897
else :
3898
3898
print_error ("Invalid hotkey ss58 address." )
3899
- raise typer . Exit ()
3899
+ return False
3900
3900
elif all_hotkeys :
3901
3901
wallet = self .wallet_ask (
3902
3902
wallet_name ,
@@ -3981,6 +3981,7 @@ def stake_remove(
3981
3981
"Hotkeys must be a comma-separated list of ss58s or names, e.g., `--include-hotkeys hk1,hk2`." ,
3982
3982
is_ss58 = False ,
3983
3983
)
3984
+ return False
3984
3985
3985
3986
if exclude_hotkeys :
3986
3987
exclude_hotkeys = parse_to_list (
@@ -3989,6 +3990,7 @@ def stake_remove(
3989
3990
"Hotkeys must be a comma-separated list of ss58s or names, e.g., `--exclude-hotkeys hk3,hk4`." ,
3990
3991
is_ss58 = False ,
3991
3992
)
3993
+ return False
3992
3994
3993
3995
return self ._run_command (
3994
3996
remove_stake .unstake (
0 commit comments