disable jsonrpc on android

This commit is contained in:
ThomasV 2018-01-07 16:13:56 +01:00
parent 79d402d3f9
commit 0045784a58
2 changed files with 9 additions and 6 deletions

View File

@ -372,7 +372,7 @@ if __name__ == '__main__':
fd, server = daemon.get_fd_or_server(config)
if fd is not None:
plugins = init_plugins(config, config.get('gui', 'qt'))
d = daemon.Daemon(config, fd)
d = daemon.Daemon(config, fd, is_android)
d.start()
d.init_gui(config, plugins)
sys.exit(0)
@ -393,7 +393,7 @@ if __name__ == '__main__':
print_stderr("starting daemon (PID %d)" % pid)
sys.exit(0)
init_plugins(config, 'cmdline')
d = daemon.Daemon(config, fd)
d = daemon.Daemon(config, fd, is_android)
d.start()
if config.get('websocket_server'):
from electrum import websockets

View File

@ -89,7 +89,7 @@ def get_server(config):
class Daemon(DaemonThread):
def __init__(self, config, fd):
def __init__(self, config, fd, is_android):
DaemonThread.__init__(self)
self.config = config
if config.get('offline'):
@ -103,9 +103,12 @@ class Daemon(DaemonThread):
self.gui = None
self.wallets = {}
# Setup JSONRPC server
self.cmd_runner = Commands(self.config, None, self.network)
self.init_server(config, fd)
if not is_android:
# Setup JSONRPC server
self.cmd_runner = Commands(self.config, None, self.network)
self.init_server(config, fd)
else:
self.server = None
def init_server(self, config, fd):
host = config.get('rpchost', '127.0.0.1')