diff --git a/txupnp/__init__.py b/txupnp/__init__.py index 71c452f..7585237 100644 --- a/txupnp/__init__.py +++ b/txupnp/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.0.1a8" +__version__ = "0.0.1a9" __name__ = "txupnp" __author__ = "Jack Robison" __maintainer__ = "Jack Robison" diff --git a/txupnp/soap.py b/txupnp/soap.py index 45395a2..1e53b7b 100644 --- a/txupnp/soap.py +++ b/txupnp/soap.py @@ -35,7 +35,7 @@ class SOAPServiceManager(object): 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)) + defer.returnValue(len(self._command_runners) > 0) def set_runner(self, urn): if urn not in self._command_runners: diff --git a/txupnp/upnp.py b/txupnp/upnp.py index 69e14da..0b4e1b5 100644 --- a/txupnp/upnp.py +++ b/txupnp/upnp.py @@ -51,8 +51,7 @@ class UPnP(object): log.warning("nothing left to try") if try_txupnp: try: - yield self.soap_manager.discover_services(timeout=timeout, max_devices=max_devices) - found = True + found = yield self.soap_manager.discover_services(timeout=timeout, max_devices=max_devices) except defer.TimeoutError: found = False finally: