fix generate_test_data

This commit is contained in:
Jack Robison 2018-10-11 17:59:02 -04:00
parent 210073af93
commit 265c03a5da
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -183,12 +183,12 @@ class UPnP:
try: try:
external_ip = await self.get_external_ip() external_ip = await self.get_external_ip()
print("got external ip: %s" % external_ip) print("got external ip: %s" % external_ip)
except UPnPError: except (UPnPError, NotImplementedError):
print("failed to get the external ip") print("failed to get the external ip")
try: try:
redirects = await self.get_redirects() redirects = await self.get_redirects()
print("got redirects:\n%s" % redirects) print("got redirects:\n%s" % redirects)
except UPnPError: except (UPnPError, NotImplementedError):
print("failed to get redirects") print("failed to get redirects")
try: try:
@ -196,7 +196,7 @@ class UPnP:
print("set up external mapping to port %i" % ext_port) print("set up external mapping to port %i" % ext_port)
await self.delete_port_mapping(ext_port, "UDP") await self.delete_port_mapping(ext_port, "UDP")
print("deleted mapping") print("deleted mapping")
except UPnPError: except (UPnPError, NotImplementedError):
print("failed to add and remove a mapping") print("failed to add and remove a mapping")
device = list(self.gateway.devices.values())[0] device = list(self.gateway.devices.values())[0]