misc: fts add support for non-ascii author names in yaml 87/26887/2
authorPaul Vinciguerra <pvinci@vinciconsulting.com>
Tue, 5 May 2020 15:46:26 +0000 (11:46 -0400)
committerOle Trøan <otroan@employees.org>
Wed, 6 May 2020 09:46:12 +0000 (09:46 +0000)
Type: fix

Change-Id: I3f034ca86412b58d3e41a627bd8902157683435a
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
src/scripts/fts.py

index f5ac4d8..c1dd882 100755 (executable)
@@ -248,12 +248,12 @@ def main():
         featurefile = featurefile.rstrip()
 
         # Load configuration file
-        with open(featurefile) as f:
+        with open(featurefile, encoding='utf-8') as f:
             cfg = yaml.load(f, Loader=yaml.SafeLoader)
         try:
             validate(instance=cfg, schema=schema)
         except exceptions.ValidationError:
-            print('File does not validate: {featurefile}',
+            print(f'File does not validate: {featurefile}',
                   file=sys.stderr)
             raise
         features[featurefile] = cfg