fix generate_test_data
This commit is contained in:
parent
210073af93
commit
265c03a5da
1 changed files with 3 additions and 3 deletions
|
@ -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]
|
||||||
|
|
Loading…
Reference in a new issue