aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Noll <nbnoll@eml.cc>2020-08-20 13:34:13 -0700
committerNicholas Noll <nbnoll@eml.cc>2020-08-20 13:34:13 -0700
commit70e85b88c3038ad707d1e7a149be3b502c58f868 (patch)
tree0bb17aa1dd794ac3d5f55a9f8fba277ffa965110
parent53dbbf03451cf9495fb9602257ecadf2e1f843e5 (diff)
fix: small typos
-rwxr-xr-x[-rw-r--r--]scripts/parse_log.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/parse_log.py b/scripts/parse_log.py
index 1caae07..82d5e0d 100644..100755
--- a/scripts/parse_log.py
+++ b/scripts/parse_log.py
@@ -19,21 +19,23 @@ def main(args):
for line in log:
line.rstrip('\n')
if line[0] == "+":
- assert line.startwith(level_preset), "check syntax in log file"
+ assert line.startswith(level_preset), "check syntax in log file"
level = int(line[level_offset:line.find("+++", level_offset)])
continue
if line[0] == ">":
- if line[1:] == "NO MATCH":
+ if line[1:].startswith("NO MATCH"):
stats[level]['miss'] += 1
continue
if line[1:].startswith("LEN="):
offset = [line.find(";")]
offset.append(line.find(";", offset[0]))
- score[0] = int(line[line.find(score_preset, offset[0])+1+score_offset:offset[1])
- score[1] = int(line[line.find(score_preset, offset[1])+1+score_offset:)
+ score[0] = int(line[line.find(score_preset, offset[0])+1+score_offset:offset[1]])
+ score[1] = int(line[line.find(score_preset, offset[1])+1+score_offset:])
stats[level]['hits'].extend(score)
+ continue
+
+ raise ValueError(f"invalid syntax: {line[1:]}")
- raise ValueError(f"invalid syntax: {line}")
print(stats)
parser = argparse.ArgumentParser(description='process our data log files on end repair')