From d9b1be6214bbbc82daa4340418d80b6246be17c2 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Fri, 26 Oct 2018 12:42:12 -0400 Subject: [PATCH] add aioupnp version to upnp status -set non-blank not found message if upnp fails --- lbrynet/daemon/Components.py | 4 +++- lbrynet/daemon/Daemon.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lbrynet/daemon/Components.py b/lbrynet/daemon/Components.py index acfabdd53..f5e16a919 100644 --- a/lbrynet/daemon/Components.py +++ b/lbrynet/daemon/Components.py @@ -8,6 +8,7 @@ from hashlib import sha256 from types import SimpleNamespace from twisted.internet import defer, threads, reactor, error, task import lbryschema +from aioupnp import __version__ as aioupnp_version from aioupnp.upnp import UPnP from aioupnp.fault import UPnPError from lbrynet import conf @@ -792,8 +793,9 @@ class UPnPComponent(Component): def get_status(self): return { + 'aioupnp_version': aioupnp_version, 'redirects': self.upnp_redirects, - 'gateway': '' if not self.upnp else self.upnp.gateway.manufacturer_string, + 'gateway': 'No gateway found' if not self.upnp else self.upnp.gateway.manufacturer_string, 'dht_redirect_set': 'UDP' in self.upnp_redirects, 'peer_redirect_set': 'TCP' in self.upnp_redirects, 'external_ip': self.external_ip diff --git a/lbrynet/daemon/Daemon.py b/lbrynet/daemon/Daemon.py index 33faa1f7c..ddc15251d 100644 --- a/lbrynet/daemon/Daemon.py +++ b/lbrynet/daemon/Daemon.py @@ -773,6 +773,7 @@ class Daemon(AuthJSONRPCServer): 'managed_files': (int) count of files in the file manager, }, 'upnp': { + 'aioupnp_version': (str), 'redirects': { : (int) external_port, },