api: update open calls to use explicit encoding
BUG=b:187789896
TEST=`cros lint` is clean here
Change-Id: Ifb495351ed9f12a850320306ff708a1c5a4d9692
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4290042
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Lizzy Presland <zland@google.com>
Commit-Queue: Lizzy Presland <zland@google.com>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
diff --git a/api/controller/binhost_unittest.py b/api/controller/binhost_unittest.py
index 6b58880..0e013ba 100644
--- a/api/controller/binhost_unittest.py
+++ b/api/controller/binhost_unittest.py
@@ -425,7 +425,7 @@
package_tbz2_file = os.path.join(packages_dir, package) + ".tbz2"
osutils.Touch(package_tbz2_file)
with open(
- package_installable_filename, "w"
+ package_installable_filename, "w", encoding="utf-8"
) as package_installable_file:
for package in self.dev_install_packages:
package_installable_file.write(package + "\n")