diff --git a/txupnp/gateway.py b/txupnp/gateway.py index 7f8217a..786452d 100644 --- a/txupnp/gateway.py +++ b/txupnp/gateway.py @@ -98,8 +98,16 @@ class Device(CaseInsensitive): new_services = [new_services] services.extend([Service(**service) for service in new_services]) if self.deviceList: - devices.extend([Device(devices, services, **(kw if isinstance(kw, dict) else kw[0])) - for kw in self.deviceList.values()]) + for kw in self.deviceList.values(): + if isinstance(kw, dict): + d = Device(devices, services, **kw) + devices.append(d) + else: + if len(kw) == 1 and isinstance(kw[0], dict): + d = Device(devices, services, **kw[0]) + devices.append(d) + else: + log.warning("failed to parse device:\n%s", kw) class Gateway(object): diff --git a/txupnp/scpd.py b/txupnp/scpd.py index c9e239d..8673539 100644 --- a/txupnp/scpd.py +++ b/txupnp/scpd.py @@ -319,6 +319,26 @@ class SCPDCommandRunner(object): """Returns (None)""" raise NotImplementedError() + @staticmethod + @return_types(none) + def SetEnabledForInternet(NewEnabledForInternet): + raise NotImplementedError() + + @staticmethod + @return_types(bool) + def GetEnabledForInternet(): + raise NotImplementedError() + + @staticmethod + def GetMaximumActiveConnections(NewActiveConnectionIndex): + raise NotImplementedError() + + @staticmethod + @return_types(str, str) + def GetActiveConnections(): + """Returns (NewActiveConnDeviceContainer, NewActiveConnectionServiceID""" + raise NotImplementedError() + class UPnPFallback(object): def __init__(self):