File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ def _parse_value(value):
244244def _parse_sample (text ):
245245 separator = " # "
246246 # Detect the labels in the text
247- label_start = _next_unquoted_char ( text , '{' )
247+ label_start = text . find ( '{' )
248248 if label_start == - 1 or separator in text [:label_start ]:
249249 # We don't have labels, but there could be an exemplar.
250250 name_end = _next_unquoted_char (text , ' \t ' )
@@ -256,7 +256,7 @@ def _parse_sample(text):
256256 value , timestamp = _parse_value_and_timestamp (remaining_text )
257257 return Sample (name , {}, value , timestamp )
258258 name = text [:label_start ].strip ()
259- label_end = _next_unquoted_char ( text [ label_start :], '}' ) + label_start
259+ label_end = text . rfind ( '}' )
260260 labels = parse_labels (text [label_start + 1 :label_end ], False )
261261 if not name :
262262 # Name might be in the labels
You can’t perform that action at this time.
0 commit comments