From: Jon Severinsson <[email protected]> First, we can try to import it via the Python 3.x name. If that fails, we can try the Python 2.x name.
Signed-off-by: Kenneth Graunke <[email protected]> --- framework/glsl_parser_test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/glsl_parser_test.py b/framework/glsl_parser_test.py index 4f84ef8..d0d93bf 100755 --- a/framework/glsl_parser_test.py +++ b/framework/glsl_parser_test.py @@ -31,7 +31,10 @@ standalone tests on the command line. To add a test to a Piglit group, us usage_message = "usage: glsl_parser_test.py TEST_FILE" -import ConfigParser as configparser +try: + import configparser # The Python 3.x name +except ImportError: + import ConfigParser as configparser # The Python 2.x name import os import os.path as path import re -- 1.8.2.1 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
