diff --git a/detection_rules/rule_formatter.py b/detection_rules/rule_formatter.py index e4b4d704b60..e7c84611d36 100644 --- a/detection_rules/rule_formatter.py +++ b/detection_rules/rule_formatter.py @@ -161,7 +161,7 @@ def dump_list(self, v): dump.append(' ' * 4 + self.dump_value(item)) return '[\n{},\n]'.format(',\n'.join(dump)) - if v and all(isinstance(i, dict) for i in v): + if all(isinstance(i, dict) for i in v): # Compact inline format for lists of dictionaries with proper indentation retval = "\n" + ' ' * 2 + "[\n" retval += ",\n".join([' ' * 4 + self.dump_inline_table(u).strip() for u in v])