--- a/pvl/syslog/fifo.py Sun Jan 13 02:47:13 2013 +0200
+++ b/pvl/syslog/fifo.py Sun Jan 13 03:11:25 2013 +0200
@@ -50,7 +50,8 @@
raise ValueError("I/O operation on closed pipe: %s" % (self, ))
else :
return self._fd
-
+
+ # XXX: this is almost identical to pvl.socket.ReadStream
def read (self, n=512) :
"""
Read up to n bytes.
@@ -66,13 +67,16 @@
# block?
if ex.errno == errno.EAGAIN :
# empty
- return None
+ buf = None
else :
raise
- # eof?
- if buf :
+ log.debug("%s: %s", self, buf)
+
+ if buf is None :
+ return None
+ elif buf :
return buf
else :
raise EOFError()