summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Coonce <danielcoonce@gmail.com>2021-01-26 22:16:01 -0600
committerMartin Michlmayr <tbm@cyrius.com>2021-02-02 18:11:54 +0800
commit8891e79de49e3b458ac7911f4dcddd676d4c95a5 (patch)
tree888f57c9f5dadd14d397ff54ca9455e1b39f74cf
parent5970ca7646de18f67b2600b63d8cea25723b3fdb (diff)
downloadfork-ledger-8891e79de49e3b458ac7911f4dcddd676d4c95a5.tar.gz
fork-ledger-8891e79de49e3b458ac7911f4dcddd676d4c95a5.tar.bz2
fork-ledger-8891e79de49e3b458ac7911f4dcddd676d4c95a5.zip
Have acprep use system encoding for stdin/out
-rwxr-xr-xacprep5
1 files 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: