]> git.ipfire.org Git - location/location-database.git/commitdiff
downloader: Only return blocks with content in them
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 30 Jan 2018 14:01:38 +0000 (14:01 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 30 Jan 2018 14:01:38 +0000 (14:01 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tools/downloader.py

index 47e2f341a2eda2a909bf787f42e8233d16817ea2..af9cdf64a32dd76524faf80f60d7bcd0eef49ec1 100644 (file)
@@ -107,7 +107,8 @@ class DownloaderContext(object):
                                continue
 
                        # End the block on an empty line
-                       yield block
+                       if block:
+                               yield block
 
                        # Reset the block
                        block = []