]> TLD Linux GIT Repositories - tld-builder.git/commitdiff
- fix sendfile for binary data
authorMarcin Krol <hawk@tld-linux.org>
Sun, 2 May 2021 13:03:49 +0000 (15:03 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Sun, 2 May 2021 13:03:49 +0000 (15:03 +0200)
TLD_Builder/util.py

index 1d485a170c20378fab39a6ad092f1fd04a5dc1ee..b6bcc2460ff2053fc5494f72e3c6215b6efcbc78 100644 (file)
@@ -36,7 +36,7 @@ def sendfile(src, dst):
     cnt = 0
     while 1:
         s = src.read(10000)
-        if s == "": break
+        if s == "" or s == b"": break
         cnt += len(s)
         dst.write(s)
     return cnt