def send(self, timeout=30): rep = None status, json = self._send(self.toDict(), timeout) if status == 200: rep = BSTParser() self.__json = json["report"] rep.process(json) return status, rep
def send(self, timeout=30): status, json = self._send(self.toDict(), timeout) rep = None if status == 200: self.__json = json["report"] rep = BSTParser() rep.process(json) else: pass return status, rep
def handlePOST(self, path, ctype, length, data): parser = BSTParser() try: handled = parser.process(data) except: handled = False return (parser, handled)