X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=djbdns%2Fio.py;fp=djbdns%2Fio.py;h=1e41470452a30e4c56438ff2ab1ea84a210b0566;hb=3a5a400178399afcbc3051df860231f3c4cf4ff7;hp=75422c01387032f0a0aab6e87e8f40fac411d010;hpb=49ee5a403cafc02a8e398c840b9bbc4c9d9e0f72;p=djbdns-logparse.git diff --git a/djbdns/io.py b/djbdns/io.py index 75422c0..1e41470 100644 --- a/djbdns/io.py +++ b/djbdns/io.py @@ -37,6 +37,9 @@ def parse_logfile(file : TextIO): text=True, bufsize=0) as tai: + if not tai.stdin or not tai.stdout: + return + for line in file: tai.stdin.write(line) line = tai.stdout.readline()