From fc511cfe4ea201491c59b3a7dcef587e3a25b711 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 16 Oct 2018 09:01:40 -0400 Subject: [PATCH] show network interface error --- aioupnp/upnp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aioupnp/upnp.py b/aioupnp/upnp.py index a32c635..215aca5 100644 --- a/aioupnp/upnp.py +++ b/aioupnp/upnp.py @@ -63,8 +63,10 @@ class UPnP: ssdp_socket: socket.socket = None) -> Dict: try: lan_address, gateway_address = cls.get_lan_and_gateway(lan_address, gateway_address, interface_name) + assert gateway_address and lan_address except Exception as err: - raise UPnPError("failed to get lan and gateway addresses: %s" % str(err)) + raise UPnPError("failed to get lan and gateway addresses for interface \"%s\": %s" % (interface_name, + str(err))) if not igd_args: igd_args, datagram = await fuzzy_m_search(lan_address, gateway_address, timeout, ssdp_socket) else: