This commit is contained in:
Jack Robison 2017-12-18 11:31:59 -05:00
parent 8c2d381aee
commit 20b9e4d17e
No known key found for this signature in database
GPG key ID: 284699E7404E3CFF

View file

@ -1348,7 +1348,7 @@ class LBRYumWallet(Wallet):
# lbryum commands should be run this way , unless if the command
# only makes a lbrum server query, use _run_cmd_as_defer_to_thread()
def _run_cmd_as_defer_succeed(self, command_name, *args, **kwargs):
cmd_runner = self._get_cmd_runner()
cmd_runner = self.get_cmd_runner()
cmd = Commands.known_commands[command_name]
func = getattr(cmd_runner, cmd.name)
return defer.succeed(func(*args, **kwargs))
@ -1358,7 +1358,7 @@ class LBRYumWallet(Wallet):
# TODO: keep track of running threads and cancel them on `stop`
# otherwise the application will hang, waiting for threads to complete
def _run_cmd_as_defer_to_thread(self, command_name, *args, **kwargs):
cmd_runner = self._get_cmd_runner()
cmd_runner = self.get_cmd_runner()
cmd = Commands.known_commands[command_name]
func = getattr(cmd_runner, cmd.name)
return threads.deferToThread(func, *args, **kwargs)