summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBirte Kristina Friesel <dfriesel@uos.de>2023-08-02 16:11:45 +0200
committerBirte Kristina Friesel <dfriesel@uos.de>2023-08-02 16:11:45 +0200
commitcb7424c3de9961262a85c42416d9766741cf6749 (patch)
tree8aee1a50369482fa574638b46d7fca367ca2f75b /bin
parent90948e52fbc1a7bb8389667aa1f15dd43eb0a08e (diff)
analyze-log: print errors to stderr
Diffstat (limited to 'bin')
-rwxr-xr-xbin/analyze-log.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/analyze-log.py b/bin/analyze-log.py
index 3de63c9..91197b9 100755
--- a/bin/analyze-log.py
+++ b/bin/analyze-log.py
@@ -14,6 +14,7 @@ from dfatool.model import AnalyticModel
from dfatool.validation import CrossValidator
from functools import reduce
import json
+import sys
import re
@@ -53,9 +54,10 @@ def parse_logfile(filename):
)
except ValueError:
print(
- f"Error parsing {filename}: invalid key-value pair in line {lineno+1}"
+ f"Error parsing {filename}: invalid key-value pair in line {lineno+1}",
+ file=sys.stderr,
)
- print(f"Offending entry:\n{line}")
+ print(f"Offending entry:\n{line}", file=sys.stderr)
raise
return observations