aboutsummaryrefslogtreecommitdiff
path: root/cros_utils/command_executer.py
diff options
context:
space:
mode:
Diffstat (limited to 'cros_utils/command_executer.py')
-rwxr-xr-xcros_utils/command_executer.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/cros_utils/command_executer.py b/cros_utils/command_executer.py
index 002aa754..39bff5ed 100755
--- a/cros_utils/command_executer.py
+++ b/cros_utils/command_executer.py
@@ -240,9 +240,10 @@ class CommandExecuter(object):
return command
def WriteToTempShFile(self, contents):
+ # TODO(crbug.com/1048938): use encoding='utf-8' when all dependencies have
+ # migrated to python 3.
with tempfile.NamedTemporaryFile(
- 'w', encoding='utf-8', delete=False, prefix=os.uname()[1],
- suffix='.sh') as f:
+ 'w', delete=False, prefix=os.uname()[1], suffix='.sh') as f:
f.write('#!/bin/bash\n')
f.write(contents)
f.flush()
@@ -366,9 +367,10 @@ class CommandExecuter(object):
if self.logger:
self.logger.LogCmd(command, print_to_console=print_to_console)
+ # TODO(crbug.com/1048938): use encoding='utf-8' when all dependencies have
+ # migrated to python 3.
with tempfile.NamedTemporaryFile(
'w',
- encoding='utf-8',
delete=False,
dir=os.path.join(chromeos_root, 'src/scripts'),
suffix='.sh',