コード例 #1
0
ファイル: client.py プロジェクト: RyanMarcus/errbit-python
    def post(self, exc_info, request=None):
        if not self.get_errbit_url():
            logging.error('ERRBIT_URL not configured as environment variable.')

        if not self.get_api_key():
            logging.error('ERRBIT_API_KEY not configured as environment variable.')

        xml = xmlgenerator.generate_xml(self.get_api_key(),
                                        self.get_notifier(),
                                        exc_info, request=request,
                                        environment=self.get_environment())

        http_client = self.http_client()
        req = ThreadedRequest(self.get_errbit_url(), xml, http_client=http_client)
        req.start()
コード例 #2
0
    def post(self, exc_info, request=None):
        if not self.get_errbit_url():
            logging.error('ERRBIT_URL not configured as environment variable.')

        if not self.get_api_key():
            logging.error(
                'ERRBIT_API_KEY not configured as environment variable.')

        xml = xmlgenerator.generate_xml(self.get_api_key(),
                                        self.get_notifier(),
                                        exc_info,
                                        request=request,
                                        environment=self.get_environment())

        req = ThreadedRequest(self.get_errbit_url(), xml)
        req.start()
コード例 #3
0
    def post(self, exc_info, request=None):
        if not self.get_errbit_url():
            logging.error('ERRBIT_URL not configured as environment variable.')
            return

        if not self.get_api_key():
            logging.error('ERRBIT_API_KEY not configured as environment '
                          'variable.')
            return

        if self.is_ignored(exc_info):
            return

        xml = xmlgenerator.generate_xml(self.get_api_key(),
                                        self.get_notifier(),
                                        exc_info,
                                        request=request,
                                        environment=self.get_environment())

        http_client = self.http_client()
        req = ThreadedRequest(self.get_errbit_url(),
                              xml,
                              http_client=http_client)
        req.start()
コード例 #4
0
def generate(*args, **kwargs):
    xml = generate_xml(*args, **kwargs)
    validate_xml(xml)
    return PyQuery(xml)
コード例 #5
0
def generate(*args, **kwargs):
    xml = generate_xml(*args, **kwargs)
    validate_xml(xml)
    return PyQuery(xml)