From: Christian Herdtweck Date: Wed, 29 Jun 2016 15:05:55 +0000 (+0200) Subject: fix typo in docu and extend a little X-Git-Tag: v1.2~24 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=7c3622083cce13144e667522f9130a8f011dfca5;p=pyi2ncommon fix typo in docu and extend a little --- diff --git a/src/log_read.py b/src/log_read.py index 3bcb054..4e52560 100644 --- a/src/log_read.py +++ b/src/log_read.py @@ -18,7 +18,7 @@ """ Iterative reading of log files -Basic Functionality (class :py:class:`IterativeReader`:) +Basic Functionality (class :py:class:`IterativeReader`): Runs stat in a loop to find out whether file size has changed. Then reads the new data and forwards that @@ -101,7 +101,7 @@ class IterativeReader: Catches most common exceptions in iteration (not constructor) - Does not are about closing files, so does not accept file names + Does not care about closing files, so does not accept file names This is the base for class :py:class:`LineReader` that just has to implement a different :py:meth:`prepare_result` method @@ -257,6 +257,13 @@ class IterativeReader: available. It has to return some iterable whose entries are yielded from iteration over objects of this class. + It receives the following args: + - the description of the source + - the data itself + - the index of the source + The result must be an iterable of objects, which are yielded as-is, so + can have any form + This base implementation just returns its input in a list, so new data is yielded from __iter__ as-is """