py: gen-py-formats.py: Open input file in binary mode
Other code generation scripts do that already and let pyyaml deal with decoding utf-8, etc. So do the same here as well. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
This commit is contained in:
@@ -37,7 +37,7 @@ def main(argv):
|
||||
help='Template file name.')
|
||||
args = parser.parse_args(argv[1:])
|
||||
|
||||
with open(args.input, encoding='utf-8') as f:
|
||||
with open(args.input, 'rb') as f:
|
||||
formats = yaml.safe_load(f)['formats']
|
||||
|
||||
data = generate(formats)
|
||||
|
||||
Reference in New Issue
Block a user