]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
importer: Return the last block, too
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Jun 2020 10:59:04 +0000 (10:59 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 9 Jun 2020 10:59:21 +0000 (10:59 +0000)
Fixes: #12427
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/importer.py

index e24684cd54db40eb512f5d365e979cc5b95eebc4..de20f37857f9b09af8f914d51adcf0b352246472 100644 (file)
@@ -211,6 +211,10 @@ def iterate_over_blocks(f, charsets=("utf-8", "latin1")):
                # Reset the block
                block = []
 
+       # Return the last block
+       if block:
+               yield block
+
 
 def iterate_over_lines(f):
        for line in f: