pgsql: Modernize Python exception syntax in tests - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Modernize Python exception syntax in tests
Date
Msg-id E1ipJM9-0003qn-Et@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/45223fd9cefe483daa4af7740f15c004486636eb

Modified Files
--------------
src/pl/plpython/expected/plpython_ereport.out        | 4 ++--
src/pl/plpython/expected/plpython_error.out          | 8 ++++----
src/pl/plpython/expected/plpython_import.out         | 2 +-
src/pl/plpython/expected/plpython_params.out         | 2 +-
src/pl/plpython/expected/plpython_spi.out            | 6 +++---
src/pl/plpython/expected/plpython_subtransaction.out | 2 +-
src/pl/plpython/expected/plpython_types.out          | 2 +-
src/pl/plpython/regress-python3-mangle.mk            | 2 +-
src/pl/plpython/sql/plpython_ereport.sql             | 4 ++--
src/pl/plpython/sql/plpython_error.sql               | 8 ++++----
src/pl/plpython/sql/plpython_import.sql              | 2 +-
src/pl/plpython/sql/plpython_params.sql              | 2 +-
src/pl/plpython/sql/plpython_spi.sql                 | 6 +++---
src/pl/plpython/sql/plpython_subtransaction.sql      | 2 +-
src/pl/plpython/sql/plpython_types.sql               | 2 +-
src/tools/msvc/vcregress.pl                          | 1 -
16 files changed, 27 insertions(+), 28 deletions(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Reimplement nullification of walsender timestamp
Next
From: Andrew Dunstan
Date:
Subject: pgsql: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings