Cope with attribute errors being converted (#36911)

This commit is contained in:
craiggenner 2020-06-19 04:36:56 +01:00 committed by GitHub
parent f83d4e524b
commit 212660330f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -167,7 +167,7 @@ class PrometheusMetrics:
try:
value = float(value)
metric.labels(**self._labels(state)).set(value)
except ValueError:
except (ValueError, TypeError):
pass
def _metric(self, metric, factory, documentation, extra_labels=None):