commit | cfd25567e6ac8c3524558032d4da6db382b79165 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Fri Dec 06 23:10:08 2019 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Fri Dec 06 23:10:08 2019 +0000 |
tree | 9dee84cec3e0bbc2bb41366584c85c0fba43ddd5 | |
parent | 9e0b4ed82af836da7ccd7ea53b150ef3c07cf41d [diff] | |
parent | 07f622b078f2da438a98b8991f662b8d5d04b379 [diff] |
Merge "logtags: Support # line comments."
diff --git a/tools/event_log_tags.py b/tools/event_log_tags.py index 645839e..35b2de0 100644 --- a/tools/event_log_tags.py +++ b/tools/event_log_tags.py
@@ -62,9 +62,9 @@ try: for self.linenum, line in enumerate(file_object): self.linenum += 1 - + line = re.sub('#.*$', '', line) # strip trailing comments line = line.strip() - if not line or line[0] == '#': continue + if not line: continue parts = re.split(r"\s+", line, 2) if len(parts) < 2: