Skip to content

Commit

Permalink
scxstats_to_openmetrics: fix format string
Browse files Browse the repository at this point in the history
On Python versions that perform validation of this line it fails because
of a square bracket mismatch. This is due to the single quotes being
parsed first. Fix by changing the outer string to double quotes.
  • Loading branch information
JakeHillion committed Sep 16, 2024
1 parent 4f98de3 commit 23acd6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rust/scx_stats/scripts/scxstats_to_openmetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def request(f, req, args={}):
f.flush()
resp = json.loads(f.readline())
if resp['errno'] != 0:
raise Exception(f'req: {req} args: {args} failed with {resp['errno']} ({resp['args']['resp']})')
raise Exception(f"req: {req} args: {args} failed with {resp['errno']} ({resp['args']['resp']})")
return resp['args']['resp']

def make_om_metrics(sname, omid, field, labels, meta_db, registry):
Expand Down

0 comments on commit 23acd6e

Please sign in to comment.