From 01dc5d75d19d1b61dc931f7d224fae33a20e11e4 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Fri, 27 Jul 2018 19:32:35 -0400 Subject: [PATCH] decode error --- txupnp/ssdp.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/txupnp/ssdp.py b/txupnp/ssdp.py index 83cd686..6eb9473 100644 --- a/txupnp/ssdp.py +++ b/txupnp/ssdp.py @@ -60,7 +60,11 @@ class SSDPProtocol(DatagramProtocol): def handle_datagram(self, datagram, address): if address[0] == self.router: - server_info = self.parse_ssdp_response(datagram) + try: + server_info = self.parse_ssdp_response(datagram) + except: + log.exception("error parsing response: %s", datagram.encode('hex')) + raise if server_info: log.info("received reply (%i bytes) to SSDP request (%fs)", len(datagram), self._reactor.seconds() - self._start)