make it possible to create wallet non-interactively
add a --password option,
respect --server,--fee,--gap as passed on the command line,
and do not ask for them if they were specified.
so if all of them are passed, there are no interactive questions
asked and one can create wallets automatically via scripts.
closes#308
additionally it fixes the bug that the default fee and gap limit
were not stored in the new wallet, if entered manually.
additionally it fixes the bug that the wallet path was not displayed
correctly if a custom wallet path was used.
parser.add_option("-W", "--password", dest="password", default=None, help="set password for usage with commands (currently only implemented for create command, do not use it for longrunning gui session since the password is visible in /proc)")
return parser
def print_help(parser):
@ -185,22 +186,22 @@ if __name__ == '__main__':
if cmd in ['create', 'restore']:
if wallet.storage.file_exists:
sys.exit("Error: Remove the existing wallet first!")
if options.password != None:
password = options.password
else:
password = prompt_password("Password (hit return if you do not wish to encrypt your wallet):")