Skip to content

Commit

Permalink
trying to fix windows encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszkwiecinski committed Mar 6, 2024
1 parent 328a0cb commit 8180584
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,15 @@ def sizeof_fmt(num, suffix='B', sign=False):
process = subprocess.Popen(exec_call, stdout=subprocess.PIPE)
out, _ = process.communicate()

diff = out.decode(encoding=sys.stdout.encoding).strip()
diff = out.decode(sys.stdout.encoding).strip()

if process.returncode != 0:
raise Exception("Error while executing diffuse")

if is_debug():
print(f"Encoding: {sys.stdout.encoding}")
print(f"out preview: {out.decode(sys.stdout.encoding)[0:200]}")
print(f"Diff preview: {diff[0:200]}")
print(f"Diff size: {len(diff)}")

headerPattern = re.compile('=+\\s=+\\s+(\\w+)\\s+=+\\s=*\\s')
Expand Down

0 comments on commit 8180584

Please sign in to comment.