Skip to content

Commit 2d62ba1

Browse files
committed
util: make prints simpler for genRuleFile
Signed-off-by: Vitor Bandeira <[email protected]>
1 parent 1adb9c6 commit 2d62ba1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flow/util/genRuleFile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def gen_rule_file(
9696
with open(metrics_file, "r") as f:
9797
metrics = json.load(f)
9898
else:
99-
print(f"[ERROR] File not found {abspath(metrics_file)}")
99+
print(f"[ERROR] Golden metrics file not found {design_dir}")
100100
sys.exit(1)
101101
else:
102102
metrics = golden_metrics
@@ -105,7 +105,7 @@ def gen_rule_file(
105105
with open(rules_file, "r") as f:
106106
OLD_RULES = json.load(f)
107107
else:
108-
print(f"[WARNING] File not found {abspath(rules_file)}")
108+
print(f"[WARNING] Rules file not found {design_dir}")
109109
OLD_RULES = None
110110

111111
# dict format
@@ -370,12 +370,12 @@ def gen_rule_file(
370370
rules[field] = dict(value=rule_value, compare=option["compare"])
371371

372372
if len(change_str) > 0:
373+
print(design_dir)
373374
print(format_str.format("Metric", "Old", "New", "Type"), end="")
374375
print(format_str.format("------", "---", "---", "----"), end="")
375376
print(change_str)
376377

377378
with open(rules_file, "w") as f:
378-
print("[INFO] writing", abspath(rules_file))
379379
json.dump(rules, f, indent=4)
380380

381381
chdir(original_directory)

0 commit comments

Comments
 (0)