move yield_chunks to common.py
[~helmut/crossqa.git] / build.py
index c0def3b..37a585a 100755 (executable)
--- a/build.py
+++ b/build.py
@@ -8,14 +8,7 @@ import os.path
 import sqlite3
 import subprocess
 
-from common import decompress_stream, yield_lines
-
-def yield_chunks(filelike, chunksize=65536):
-    while True:
-        data = filelike.read(chunksize)
-        if not data:
-            break
-        yield data
+from common import decompress_stream, yield_lines, yield_chunks
 
 def scan_log_status(filelike):
     it = yield_chunks(filelike)