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 67f5307..fd7b2a6 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):