diff --git a/import_logs.py b/import_logs.py index 0dfd1a6..1850535 100755 --- a/import_logs.py +++ b/import_logs.py @@ -289,7 +289,11 @@ def create_regex(self, file): # if we're reading from stdin, we can't seek, so don't read any more than the Fields line header_lines = [] while fields_line is None: - line = file.readline().strip() + line = file.readline() + if not line: + break + + line = line.strip() if not line: continue