diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-06 11:34:59 +0000 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-11 11:08:33 +0000 |
| commit | 047af5c3430c90f93b7d00bcd86b189115b7f685 (patch) | |
| tree | 76d896a804170dd23bb9fa3548c20d87e711276e /utils/python-rpc/framework/daemon.py | |
| parent | 9f9571aa3d1f86feb46408dfc93abc7a8433095e (diff) | |
| download | monzero-core-047af5c3430c90f93b7d00bcd86b189115b7f685.tar.gz monzero-core-047af5c3430c90f93b7d00bcd86b189115b7f685.tar.xz monzero-core-047af5c3430c90f93b7d00bcd86b189115b7f685.zip | |
console.py: can now connect to several daemons/wallets
Also throw exceptions instead of print+exit, since that makes
the error print last, below the python stack trace, where it's
much less easy to miss it.
Diffstat (limited to 'utils/python-rpc/framework/daemon.py')
| -rw-r--r-- | utils/python-rpc/framework/daemon.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/python-rpc/framework/daemon.py b/utils/python-rpc/framework/daemon.py index 7968ef7fd..f4d5e90f0 100644 --- a/utils/python-rpc/framework/daemon.py +++ b/utils/python-rpc/framework/daemon.py @@ -33,6 +33,8 @@ from .rpc import JSONRPC class Daemon(object): def __init__(self, protocol='http', host='127.0.0.1', port=0, idx=0): + self.host = host + self.port = port self.rpc = JSONRPC('{protocol}://{host}:{port}'.format(protocol=protocol, host=host, port=port if port else 18180+idx)) def getblocktemplate(self, address, prev_block = ""): |
