chiark / gitweb /
buildorder.py: Open files with encoding=utf-8
authorFredrik Fornwall <fredrik@fornwall.net>
Mon, 9 Jan 2017 10:26:31 +0000 (05:26 -0500)
committerFredrik Fornwall <fredrik@fornwall.net>
Mon, 9 Jan 2017 10:26:31 +0000 (05:26 -0500)
This makes us not depend on the current environment. Fixes #665.

scripts/buildorder.py

index 67f53074fbdaf983fcbc5e32b0293aff68b04a2f..fd7b2a640801d4d663415570ae491f1408199c7e 100755 (executable)
@@ -40,7 +40,7 @@ class TermuxBuildFile(object):
         pkg_dep_prefix = 'TERMUX_PKG_DEPENDS='
         subpkg_dep_prefix = 'TERMUX_SUBPKG_DEPENDS='
 
-        with open(self.path) as f:
+        with open(self.path, encoding="utf-8") as f:
             prefix = None
             for line in f:
                 if line.startswith(pkg_dep_prefix):