def do_open(self, arguments):
if self.Wallet:
self.do_close_wallet()
item = get_arg(arguments)
if item and item == 'wallet':
path = get_arg(arguments, 1)
if path:
if not os.path.exists(path):
print("wallet file not found")
return
passwd = prompt("[Password]> ", is_password=True)
try:
self.Wallet = UserWallet.Open(path, passwd)
self._walletdb_loop = task.LoopingCall(self.Wallet.ProcessBlocks)
self._walletdb_loop.start(1)
print("Opened wallet at %s" % path)
except Exception as e:
print("could not open wallet: %s " % e)
else:
print("Please specify a path")
else:
print("please specify something to open")
评论列表
文章目录