1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-11-18 06:11:49 -05:00

Ensure fetch-stats ip is a string

This commit is contained in:
Hemna 2023-07-22 16:41:54 -04:00
parent 6ae55fc9a1
commit cbef93b327
2 changed files with 3 additions and 6 deletions

View File

@ -51,7 +51,7 @@ def fetch_stats(ctx, ip_address, port, magic_word):
console = Console()
with console.status(msg):
client = rpc_client.RPCClient(ip_address, port, magic_word)
client = rpc_client.RPCClient(str(ip_address), port, magic_word)
stats = client.get_stats_dict()
console.print_json(data=stats)
aprsd_title = (

View File

@ -52,11 +52,9 @@ class RPCClient:
LOG.debug(f"RPC Client: {self.ip}:{self.port} {self.magic_word}")
def _rpyc_connect(
self, host, port,
service=rpyc.VoidService,
self, host, port, service=rpyc.VoidService,
config={}, ipv6=False,
keepalive=False, authorizer=None,
):
keepalive=False, authorizer=None, ):
print(f"Connecting to RPC host {host}:{port}")
try:
@ -71,7 +69,6 @@ class RPCClient:
def get_rpc_client(self):
if not self._rpc_client:
CONF.rpc_settings.magic_word
self._rpc_client = self._rpyc_connect(
self.ip,
self.port,