This commit is contained in:
Jack Robison 2018-07-31 18:20:11 -04:00
parent 7d591b5408
commit bde1ab442b
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
2 changed files with 30 additions and 2 deletions

View file

@ -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):

View file

@ -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):