From b4564499403242caa2c3ac5667fb9e099077f341 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 7 Oct 2020 22:41:04 +0100 Subject: [PATCH] Update python_pybuffer_runme.py syntax for working under both python 2 and 3 --- .../test-suite/python/python_pybuffer_runme.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Examples/test-suite/python/python_pybuffer_runme.py b/Examples/test-suite/python/python_pybuffer_runme.py index 7703cac12..65079200b 100644 --- a/Examples/test-suite/python/python_pybuffer_runme.py +++ b/Examples/test-suite/python/python_pybuffer_runme.py @@ -47,24 +47,24 @@ else: try: python_pybuffer.func1(1) - raise RuntimeError, "should throw TypeError" - except TypeError, e: + raise RuntimeError("should throw TypeError") + except TypeError as e: check("(char *buf1, int len)" in str(e)) try: python_pybuffer.func2(1) - raise RuntimeError, "should throw TypeError" - except TypeError, e: + raise RuntimeError("should throw TypeError") + except TypeError as e: check("(char *buf2)" in str(e)) try: python_pybuffer.func3(1) - raise RuntimeError, "should throw TypeError" - except TypeError, e: + raise RuntimeError("should throw TypeError") + except TypeError as e: check("(const char *buf3, int len)" in str(e)) try: python_pybuffer.func4(1) - raise RuntimeError, "should throw TypeError" - except TypeError, e: + raise RuntimeError("should throw TypeError") + except TypeError as e: check("(const char *buf4)" in str(e))