From: Marcin Krol Date: Sun, 2 May 2021 13:03:49 +0000 (+0200) Subject: - fix sendfile for binary data X-Git-Url: https://git.tld-linux.org/?p=tld-builder.git;a=commitdiff_plain;h=98894bf10f64d2133335f23117234f9f9ebefe0d - fix sendfile for binary data --- diff --git a/TLD_Builder/util.py b/TLD_Builder/util.py index 1d485a1..b6bcc24 100644 --- a/TLD_Builder/util.py +++ b/TLD_Builder/util.py @@ -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