summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/analyze-log.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/analyze-log.py b/bin/analyze-log.py
index d6ae27a..1deb438 100755
--- a/bin/analyze-log.py
+++ b/bin/analyze-log.py
@@ -21,15 +21,18 @@ import time
def parse_logfile(filename):
- lf = dfatool.utils.Logfile()
+ if ".csv" in filename:
+ loader = dfatool.utils.CSVfile()
+ else:
+ loader = dfatool.utils.Logfile()
if filename.endswith("xz"):
import lzma
with lzma.open(filename, "rt") as f:
- return lf.load(f)
+ return loader.load(f)
with open(filename, "r") as f:
- return lf.load(f)
+ return loader.load(f)
def main():