aboutsummaryrefslogtreecommitdiff
path: root/binary_search_tool/test/switch_tmp.py
diff options
context:
space:
mode:
Diffstat (limited to 'binary_search_tool/test/switch_tmp.py')
-rwxr-xr-xbinary_search_tool/test/switch_tmp.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/binary_search_tool/test/switch_tmp.py b/binary_search_tool/test/switch_tmp.py
index 51b7110e..0f3c4234 100755
--- a/binary_search_tool/test/switch_tmp.py
+++ b/binary_search_tool/test/switch_tmp.py
@@ -1,4 +1,9 @@
-#!/usr/bin/env python2
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+# Copyright 2020 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
"""Change portions of the object files to good.
This file is a test switch script. Used only for the test test_tmp_cleanup.
@@ -11,7 +16,7 @@ from __future__ import print_function
import sys
-import common
+from binary_search_tool.test import common
def Main(argv):
@@ -23,7 +28,7 @@ def Main(argv):
working_set[int(oi)] = 42
common.WriteWorkingSet(working_set)
- with open('tmp_file', 'w') as f:
+ with open('tmp_file', 'w', encoding='utf-8') as f:
f.write(argv[1])
return 0