Commit 90e66af1 authored by Morten Brekkevold's avatar Morten Brekkevold
Browse files

Fix error in formatting lists of integers

Because:
- Attempting to format a list of integers for Slack log processing
  crashes if any of the integers can be interpreted as an IP address.
parent bd62afd3
......@@ -175,7 +175,7 @@ class SlackFormatter(logging.Formatter):
newarg = [cls._format_arg(i) for i in arg]
return "\n".join(" • {}".format(s) for s in newarg)
elif any(_is_valid_ip(i) for i in arg):
newarg = [cls._format_arg(i) for i in arg]
newarg = [str(cls._format_arg(i)) for i in arg]
return ", ".join(newarg)
return arg
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment