Modernize Python exception syntax in tests
authorPeter Eisentraut <peter@eisentraut.org>
Wed, 8 Jan 2020 20:48:44 +0000 (21:48 +0100)
committerPeter Eisentraut <peter@eisentraut.org>
Wed, 8 Jan 2020 21:47:22 +0000 (22:47 +0100)
commit45223fd9cefe483daa4af7740f15c004486636eb
treecd00580944d074ca0e22aad5fde3a79d58d5f274
parent37f21ed132d1c5aee88e81fee0a0b7e735673d35
Modernize Python exception syntax in tests

Change the exception syntax used in the tests to use the more current

    except Exception as ex:

rather than the old

    except Exception, ex:

Since support for Python <2.6 has been removed, all supported versions
now support the new style, and we can save one step in the Python 3
compatibility conversion.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/98b69261-298c-13d2-f34d-836fd9c29b21%402ndquadrant.com
16 files changed:
src/pl/plpython/expected/plpython_ereport.out
src/pl/plpython/expected/plpython_error.out
src/pl/plpython/expected/plpython_import.out
src/pl/plpython/expected/plpython_params.out
src/pl/plpython/expected/plpython_spi.out
src/pl/plpython/expected/plpython_subtransaction.out
src/pl/plpython/expected/plpython_types.out
src/pl/plpython/regress-python3-mangle.mk
src/pl/plpython/sql/plpython_ereport.sql
src/pl/plpython/sql/plpython_error.sql
src/pl/plpython/sql/plpython_import.sql
src/pl/plpython/sql/plpython_params.sql
src/pl/plpython/sql/plpython_spi.sql
src/pl/plpython/sql/plpython_subtransaction.sql
src/pl/plpython/sql/plpython_types.sql
src/tools/msvc/vcregress.pl