scripts: update open calls to use explicit encoding

BUG=b:187789896
TEST=`cros lint` is clean here

Change-Id: Ia54475869c17292505537334362cd4cff6438b14
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/4290041
Commit-Queue: Cindy Lin <xcl@google.com>
Reviewed-by: Cindy Lin <xcl@google.com>
Tested-by: Mike Frysinger <vapier@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
diff --git a/scripts/crosfw.py b/scripts/crosfw.py
index 8491d3e..6034d4c 100644
--- a/scripts/crosfw.py
+++ b/scripts/crosfw.py
@@ -176,7 +176,7 @@
 
 rc_file = os.path.expanduser("~/.crosfwrc")
 if os.path.exists(rc_file):
-    with open(rc_file) as fp:
+    with open(rc_file, "rb") as fp:
         # pylint: disable=exec-used
         exec(compile(fp.read(), rc_file, "exec"))
 
@@ -385,7 +385,7 @@
         board_format = PRE_KBUILD
     else:
         board_format = PRE_KCONFIG
-    with open("boards.cfg") as f:
+    with open("boards.cfg", encoding="utf-8") as f:
         for line in f:
             if "genboardscfg" in line:
                 board_format = KCONFIG