Skip to content

Commit 5ac9869

Browse files
authored
Merge pull request #3207 from vvbandeira/rules-txt
util: only print message on updates
2 parents 8ee6bc1 + 08e25d9 commit 5ac9869

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

flow/util/genRuleFile.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ def gen_rule_file(
2121
metrics_file=None,
2222
metrics_to_consider=[],
2323
):
24-
print(f"{os.path.normpath(rules_file)} updates:")
25-
2624
with open(metrics_file, "r") as f:
2725
metrics = json.load(f)
2826
if not isinstance(metrics, dict):
@@ -296,6 +294,7 @@ def gen_rule_file(
296294
rules[field] = dict(value=rule_value, compare=option["compare"])
297295

298296
if len(change_str) > 0:
297+
print(f"{os.path.normpath(rules_file)} updates:")
299298
print(format_str.format("Metric", "Old", "New", "Type"), end="")
300299
print(format_str.format("------", "---", "---", "----"), end="")
301300
print(change_str)

0 commit comments

Comments
 (0)