class OAPresent(BaseObject): def __init__(self): BaseObject.__init__(self) self.name("OAPresent") self.oa_presenter = OAPresentation(CONFIG_FILE) def update(self, data): self.logger.info("[%s] Starting post-processing.", self.name()) try: if type(data) is dict: if len(data) > 0: return self.oa_presenter.update(data) else: return True else: self.logger.warning("[%s] Got invalid data of type '%s'", self.name(), type(data)) return False except Exception as e: self.logger.error("[%s] Presenting failed (Error: %s)", self.name(), e, exc_info=True) return False
def __init__(self): BaseObject.__init__(self) self.name("OAPresent") self.oa_presenter = OAPresentation(CONFIG_FILE)