def read(self, request): try: metricRec = metricRecorder() metricRec.newInstance(request, 'PICBadgeAPI', 'Libre') metricRec.addMetric('ServiceEndpoint', 'GetLicenses') metricRec.sendMetric() except IOError as e: log.debug("Error while calling the metric client") log.error(e) pic_cc_licenses = picLicenses() return HttpResponse(pic_cc_licenses.getLicenseClasses())
def read(self, request): try: metricRec= metricRecorder() metricRec.newInstance(request,'PICBadgeAPI','Libre') metricRec.addMetric('ServiceEndpoint','GetLicenses') metricRec.sendMetric() except IOError as e: log.debug("Error while calling the metric client") log.error (e) pic_cc_licenses = picLicenses() return HttpResponse(pic_cc_licenses.getLicenseClasses())