]> gitweb.michael.orlitzky.com - djbdns-logparse.git/blobdiff - djbdns/io.py
djbdns/io.py: handle nonexistent Popen stdin/stdout.
[djbdns-logparse.git] / djbdns / io.py
index 75422c01387032f0a0aab6e87e8f40fac411d010..1e41470452a30e4c56438ff2ab1ea84a210b0566 100644 (file)
@@ -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()