From dd635a5b7fea4ddaf5f5270d09d116c224221661 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Sat, 28 Jul 2018 22:33:45 -0400 Subject: [PATCH] 'st' keyerror --- txupnp/soap.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/txupnp/soap.py b/txupnp/soap.py index 425717d..13e5f1b 100644 --- a/txupnp/soap.py +++ b/txupnp/soap.py @@ -24,13 +24,16 @@ class SOAPServiceManager(object): ) locations = [] for server_info in server_infos: - if server_info['st'] not in self._command_runners: + if 'st' in server_info and server_info['st'] not in self._command_runners: locations.append(server_info['location']) gateway = Gateway(**server_info) yield gateway.discover_services() command_runner = SCPDCommandRunner(gateway) yield command_runner.discover_commands() self._command_runners[gateway.urn.decode()] = command_runner + elif 'st' not in server_info: + log.error("don't know how to handle gateway: %s", server_info) + continue defer.returnValue(len(self._command_runners)) def set_runner(self, urn):