diff options
author | Erik Johnston <erik@matrix.org> | 2018-05-09 15:32:07 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-05-09 15:32:07 +0100 |
commit | cddf91c8b942167feb1e1b87e3c3e80dbc7fa02f (patch) | |
tree | cda316a97bc6538074c66cb6267ce23f0793ec78 /synapse/metrics/metric.py | |
parent | Remove unused code path from member change DB func (diff) | |
parent | Merge pull request #3196 from matrix-org/erikj/pagination_return (diff) | |
download | synapse-cddf91c8b942167feb1e1b87e3c3e80dbc7fa02f.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/remove_membership_change
Diffstat (limited to 'synapse/metrics/metric.py')
-rw-r--r-- | synapse/metrics/metric.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/metrics/metric.py b/synapse/metrics/metric.py index fbba94e633..f421e7a93f 100644 --- a/synapse/metrics/metric.py +++ b/synapse/metrics/metric.py @@ -71,7 +71,8 @@ class BaseMetric(object): """Render this metric for a single set of labels Args: - label_values (list[str]): values for each of the labels + label_values (list[object]): values for each of the labels, + (which get stringified). value: value of the metric at with these labels Returns: @@ -324,4 +325,4 @@ def _escape_character(m): def _escape_label_value(value): """Takes a label value and escapes quotes, newlines and backslashes """ - return re.sub(r"([\n\"\\])", _escape_character, value) + return re.sub(r"([\n\"\\])", _escape_character, str(value)) |