def processPayload(self, payload): stripped = Util.removeNewLine(payload) jsonRegexResult = self.JSON_RE.search(stripped) jsonRegexMatched = jsonRegexResult.group(0) jsonRegexMatched = Util.evalJson(jsonRegexMatched) jsonObjects = Util.loadsJsonString(jsonRegexMatched, "utf-8") for jsonObj in jsonObjects: exchange = jsonObj['e'] symbol = jsonObj['t'] self.storeQuote(exchange, symbol, jsonObj) self.emit(SIGNAL("quotesCached"))