--- a/pvl/socket.py Sun Jan 13 12:59:05 2013 +0200
+++ b/pvl/socket.py Sun Jan 13 13:04:51 2013 +0200
@@ -229,6 +229,8 @@
Line is returned without trailing '\r\n' or '\n'.
Returns None if there is no line available.
+
+ XXX: trailing data in buf when _read() raises EOFError?
"""
while '\n' not in self._buf :
@@ -263,7 +265,6 @@
line = self.readline()
if line is None :
- # no more
return
else :
yield line
--- a/pvl/syslog/syslog.py Sun Jan 13 12:59:05 2013 +0200
+++ b/pvl/syslog/syslog.py Sun Jan 13 13:04:51 2013 +0200
@@ -112,3 +112,15 @@
log.debug("exit")
+ def close (self) :
+ """
+ Close the syslog source, if possible.
+
+ """
+
+ # XXX: do all sources support close?
+ self.source.close()
+
+ def __str__ (self) :
+ return ' | '.join((str(self.source), str(self.parser), str(self.filter)))
+