From 8891e79de49e3b458ac7911f4dcddd676d4c95a5 Mon Sep 17 00:00:00 2001 From: Daniel Coonce Date: Tue, 26 Jan 2021 22:16:01 -0600 Subject: Have acprep use system encoding for stdin/out --- acprep | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/acprep b/acprep index cb1d3b92..fb9ebd6c 100755 --- a/acprep +++ b/acprep @@ -13,6 +13,7 @@ import os import re import shutil import sys +import locale try: import hashlib @@ -501,7 +502,7 @@ class PrepareBuild(CommandLineApp): self.log.info("Installing Ledger's build dependencies ...") - system = self.get_stdout('uname', '-s').decode('utf8') + system = self.get_stdout('uname', '-s').decode(locale.getpreferredencoding()) if system == 'Darwin': if exists('/opt/local/bin/port'): @@ -744,7 +745,7 @@ class PrepareBuild(CommandLineApp): self.configure_args.append(self.source_dir) def setup_for_system(self): - system = str(self.get_stdout('uname', '-s')) + system = self.get_stdout('uname', '-s').decode(locale.getpreferredencoding()) self.log.info('System type is => ' + system) if self.options.enable_doxygen: -- cgit v1.2.3