replace exit with sys.exit
This commit is contained in:
parent
f045490597
commit
2a9c62c9b8
8
electrum
8
electrum
|
@ -97,7 +97,7 @@ def print_help(parser):
|
||||||
print_msg("Type 'electrum help <command>' to see the help for a specific command")
|
print_msg("Type 'electrum help <command>' to see the help for a specific command")
|
||||||
print_msg("Type 'electrum --help' to see the list of options")
|
print_msg("Type 'electrum --help' to see the list of options")
|
||||||
run_command('help')
|
run_command('help')
|
||||||
exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
def print_help_cb(self, opt, value, parser):
|
def print_help_cb(self, opt, value, parser):
|
||||||
|
@ -279,13 +279,13 @@ if __name__ == '__main__':
|
||||||
password = prompt_password('Password:', False)
|
password = prompt_password('Password:', False)
|
||||||
if not password:
|
if not password:
|
||||||
print_msg("Error: Password required")
|
print_msg("Error: Password required")
|
||||||
exit(1)
|
sys.exit(1)
|
||||||
# check password
|
# check password
|
||||||
try:
|
try:
|
||||||
seed = wallet.get_seed(password)
|
seed = wallet.get_seed(password)
|
||||||
except Exception:
|
except Exception:
|
||||||
print_msg("Error: This password does not decode this wallet.")
|
print_msg("Error: This password does not decode this wallet.")
|
||||||
exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
password = None
|
password = None
|
||||||
seed = wallet.get_seed(None)
|
seed = wallet.get_seed(None)
|
||||||
|
@ -320,7 +320,7 @@ if __name__ == '__main__':
|
||||||
for i in range(1, len(args), 2):
|
for i in range(1, len(args), 2):
|
||||||
if len(args) < i+2:
|
if len(args) < i+2:
|
||||||
print_msg("Error: Mismatched arguments.")
|
print_msg("Error: Mismatched arguments.")
|
||||||
exit(1)
|
sys.exit(1)
|
||||||
outputs.append((args[i], Decimal(args[i+1])))
|
outputs.append((args[i], Decimal(args[i+1])))
|
||||||
args = ['mksendmanytx', outputs, Decimal(options.tx_fee) if options.tx_fee else None, options.change_addr, domain]
|
args = ['mksendmanytx', outputs, Decimal(options.tx_fee) if options.tx_fee else None, options.change_addr, domain]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue