Skip to content

Commit

Permalink
tags can be None by accident
Browse files Browse the repository at this point in the history
  • Loading branch information
eliska-n committed Aug 25, 2023
1 parent 476bbbd commit 989abb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions asab/metrics/influxdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ def escape_tags(tags: dict):
"""
clean: dict = {}
for k, v in tags.items():
if v is None:
v = "unknown"
clean[k.replace(" ", "\\ ").replace(",", "\\,").replace("=", "\\=")] = v.replace(" ", "\\ ").replace(",", "\\,").replace("=", "\\=")
return clean

Expand Down

0 comments on commit 989abb0

Please sign in to comment.