From 265c03a5daa8e1f085f46c6df83a306178d84283 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Thu, 11 Oct 2018 17:59:02 -0400 Subject: [PATCH] fix generate_test_data --- aioupnp/upnp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aioupnp/upnp.py b/aioupnp/upnp.py index 8bfa3b5..c237b2a 100644 --- a/aioupnp/upnp.py +++ b/aioupnp/upnp.py @@ -183,12 +183,12 @@ class UPnP: try: external_ip = await self.get_external_ip() print("got external ip: %s" % external_ip) - except UPnPError: + except (UPnPError, NotImplementedError): print("failed to get the external ip") try: redirects = await self.get_redirects() print("got redirects:\n%s" % redirects) - except UPnPError: + except (UPnPError, NotImplementedError): print("failed to get redirects") try: @@ -196,7 +196,7 @@ class UPnP: print("set up external mapping to port %i" % ext_port) await self.delete_port_mapping(ext_port, "UDP") print("deleted mapping") - except UPnPError: + except (UPnPError, NotImplementedError): print("failed to add and remove a mapping") device = list(self.gateway.devices.values())[0]