def __call__()

in source/setup/lambda/crhelper/resource_helper.py [0:0]


    def __call__(self, event, context):
        try:
            self._log_setup(event, context)
            logger.debug(event)
            if not self._crhelper_init(event, context):
                return
            # Check for polling functions
            if self._poll_enabled() and self._sam_local:
                logger.info("Skipping poller functionality, as this is a local invocation")
            elif self._poll_enabled():
                self._polling_init(event)
            # If polling is not enabled, then we should respond
            else:
                logger.debug("enabling send_response")
                self._send_response = True
            logger.debug("_send_response: %s" % self._send_response)
            if self._send_response:
                if self.RequestType == 'Delete':
                    self._wait_for_cwlogs()
                self._cfn_response(event)
        except Exception as e:
            logger.error(e, exc_info=True)
            self._send(FAILED, str(e))
        finally:
            if self._timer:
                self._timer.cancel()