def from_info(info, metadata, client_section): if not info: return None return WatchSession('logging-%s' % info.get('machineIdentifier'), info['ratingKey'], metadata, info['state'], client=Client.from_section(client_section))
def from_info(info, metadata, client_section): if not info: return None return WatchSession( 'logging-%s' % info.get('machineIdentifier'), info['ratingKey'], metadata, info['state'], client=Client.from_section(client_section) )
def from_section(section, state, metadata, client_section=None): """ :type section: ? :type state: str :rtype: WatchSession or None """ if not section: return None return WatchSession(section.get('sessionKey'), section.get('ratingKey'), metadata, state, user=User.from_section(section), client=Client.from_section(client_section))
def from_section(section, state, metadata, client_section=None): """ :type section: ? :type state: str :rtype: WatchSession or None """ if not section: return None return WatchSession( section.get('sessionKey'), section.get('ratingKey'), metadata, state, user=User.from_section(section), client=Client.from_section(client_section) )