def __handle_kds_probesource(self, seqno, packet): probe = datasource_pb2.ProbeSource() probe.ParseFromString(packet) try: self.datasource_probesource(seqno, probe.definition) except AttributeError: self.send_datasource_probe_report(seqno, success=False)
def __handle_kds_probesource(self, seqno, packet): probe = datasource_pb2.ProbeSource() probe.ParseFromString(packet) (source, options) = self.parse_definition(probe.definition) if source is None: self.send_datasource_probe_report(seqno, success=False) return if self.probesource is None: self.send_datasource_probe_report(seqno, success=False) # self.spindown() return opts = self.probesource(source, options) if opts is None: self.send_datasource_probe_report(seqno, success=False) # self.spindown() return self.send_datasource_probe_report(seqno, **opts)