diff mbox series

[16/28] moveconfig: Use an encoding with open()

Message ID 20230810163212.2368374-17-sjg@chromium.org
State Superseded
Delegated to: Tom Rini
Headers show
Series moveconfig: Drop old code and tidy up | expand

Commit Message

Simon Glass Aug. 10, 2023, 4:31 p.m. UTC
Fix pylint warnings about needing an explicit character encoding.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/moveconfig.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index 309ff89f7af..5896deb8c71 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -1457,12 +1457,14 @@  def do_scan_source(path, do_update):
 
     # Write out the updated information
     if do_update:
-        with open(os.path.join(path, 'scripts', 'conf_nospl'), 'w') as out:
+        with open(os.path.join(path, 'scripts', 'conf_nospl'), 'w',
+                  encoding='utf-8') as out:
             print('# These options should not be enabled in SPL builds\n',
                   file=out)
             for item in sorted(spl_not_found):
                 print(item, file=out)
-        with open(os.path.join(path, 'scripts', 'conf_noproper'), 'w') as out:
+        with open(os.path.join(path, 'scripts', 'conf_noproper'), 'w',
+                  encoding='utf-8') as out:
             print('# These options should not be enabled in Proper builds\n',
                   file=out)
             for item in sorted(proper_not_found):