commit 7c702b518d7188d3ca5ccbb68d35a913d3ab061a
parent f8fad2fd2970a171acb5cf89ceb590fb259db2ca
Author: ThomasV <thomasv@electrum.org>
Date: Sun, 7 Jan 2018 16:13:56 +0100
disable jsonrpc on android
Diffstat:
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/electrum b/electrum
@@ -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
diff --git a/lib/daemon.py b/lib/daemon.py
@@ -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')