Skip to content

Commit f0ec861

Browse files
committed
Remove unneeded value and add comment.
1 parent 01d0710 commit f0ec861

File tree

1 file changed

+2
-1
lines changed
  • datadog_checks_base/datadog_checks/base/checks

1 file changed

+2
-1
lines changed

datadog_checks_base/datadog_checks/base/checks/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1490,7 +1490,8 @@ def load_config(yaml_str: str) -> Any:
14901490

14911491
decoded = stdout.strip().decode()
14921492
try:
1493-
special_values = {"nan": float("nan"), "inf": float("inf"), "-inf": float("-inf")}
1493+
# Handle special values like nan, inf, -inf, which are not valid Python literals.
1494+
special_values = {"nan": float("nan"), "inf": float("inf")}
14941495
return eval(decoded, special_values)
14951496
# a single, literal unquoted string
14961497
except Exception:

0 commit comments

Comments
 (0)