Explorar o código

Fix utf-8 issue in yam2json

Emmanuel Bouthenot %!s(int64=9) %!d(string=hai) anos
pai
achega
bb0986cb0a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      plugins/client/utils/scripts/yaml2json

+ 1 - 1
plugins/client/utils/scripts/yaml2json

@@ -28,7 +28,7 @@ def main():
     data = {'data': []}
     if os.path.exists(options.datafile):
         try:
-            with open(options.datafile) as f:
+            with open(options.datafile, encoding='utf-8') as f:
                 datayml = yaml.safe_load(f)
                 if datayml is not None:
                     for section in datayml: