diff configmix/json.py @ 166:b5ce9a8461bf

Use the filesystem encoding explicitely where appropriate.
author Franz Glasner <fzglas.hg@dom66.de>
date Thu, 14 Mar 2019 01:35:16 +0100
parents e2e8d21b4122
children b3b5ed34d180
line wrap: on
line diff
--- a/configmix/json.py	Thu Mar 14 00:21:30 2019 +0100
+++ b/configmix/json.py	Thu Mar 14 01:35:16 2019 +0100
@@ -19,6 +19,8 @@
     except ImportError:
         DictImpl = dict
 
+from .compat import u2fs        
+
 
 __all__ = ["load"]
 
@@ -39,7 +41,7 @@
     """Load a single JSON file with name `filename` and encoding `encoding`.
 
     """
-    with io.open(filename, mode="rt", encoding=encoding) as jsfp:
+    with io.open(u2fs(filename), mode="rt", encoding=encoding) as jsfp:
         #
         # The scanner (not to be changed yet) does only recognize decimal
         # integers yet.