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
return parser
def print_help(parser):
def print_help(parser):
@ -185,22 +186,22 @@ if __name__ == '__main__':
if cmd in ['create', 'restore']:
if cmd in ['create', 'restore']:
if wallet.storage.file_exists:
if wallet.storage.file_exists:
sys.exit("Error: Remove the existing wallet first!")
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):")
password = prompt_password("Password (hit return if you do not wish to encrypt your wallet):")
server = config.get('server')
# if config.server is set, the user either passed the server on command line
if not server: server = pick_random_server()
# or chose it previously already. if he didn't pass a server on the command line,