skip coverage for gather_debug_info

Signed-off-by: Jack Robison <jackrobison@lbry.io>
This commit is contained in:
Jack Robison 2020-10-13 15:32:31 -04:00
parent c3df4d21a6
commit dc80dedff9
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -13,14 +13,6 @@ from aioupnp.commands import GetGenericPortMappingEntryResponse, GetSpecificPort
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
def _encode(x):
if isinstance(x, bytes):
return x.decode()
elif isinstance(x, Exception):
return str(x)
return x
class UPnP: class UPnP:
def __init__(self, lan_address: str, gateway_address: str, gateway: Gateway) -> None: def __init__(self, lan_address: str, gateway_address: str, gateway: Gateway) -> None:
self.lan_address = lan_address self.lan_address = lan_address
@ -246,13 +238,20 @@ class UPnP:
await self.add_port_mapping(port, protocol, _internal_port, self.lan_address, description) await self.add_port_mapping(port, protocol, _internal_port, self.lan_address, description)
return port return port
async def gather_debug_info(self) -> str: async def gather_debug_info(self) -> str: # pragma: no cover
""" """
Gather debugging information for this gateway, used for generating test cases for devices with errors. Gather debugging information for this gateway, used for generating test cases for devices with errors.
:return: (str) compressed debugging information :return: (str) compressed debugging information
""" """
def _encode(x):
if isinstance(x, bytes):
return x.decode()
elif isinstance(x, Exception):
return str(x)
return x
try: try:
await self.get_external_ip() await self.get_external_ip()
except UPnPError: except UPnPError: