From f9df046436beffa6099a3c929a3bd0c50c9fddf4 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 1 Nov 2022 12:41:44 -0700 Subject: [PATCH] util/glsl2spirv: drop inconsistent use of `io.open` In Python 3 (the only python we support) `io.open` is an alias of the builtin `open` function, so it's not getting us anything, and we're not using it consistently. Reviewed-by: Luis Felipe Strano Moraes Part-of: --- src/util/glsl2spirv.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/util/glsl2spirv.py b/src/util/glsl2spirv.py index 8b765c987eb..78468a2737e 100644 --- a/src/util/glsl2spirv.py +++ b/src/util/glsl2spirv.py @@ -1,4 +1,3 @@ -# encoding=utf-8 # Copyright © 2022 Intel Corporation # # Permission is hereby granted, free of charge, to any person obtaining a @@ -24,7 +23,6 @@ import argparse import subprocess -import io import os class ShaderCompileError(RuntimeError): @@ -109,7 +107,7 @@ def postprocess_file(args): def preprocess_file(args, origin_file): - with io.open(origin_file.name + ".copy", "w") as copy_file: + with open(origin_file.name + ".copy", "w") as copy_file: lines = origin_file.readlines() if args.create_entry is not None: @@ -124,7 +122,7 @@ def preprocess_file(args, origin_file): def process_file(args): - with io.open(args.input, "r") as infile: + with open(args.input, "r") as infile: copy_file = preprocess_file(args, infile) cmd_list = ["glslangValidator"]