diff options
| author | Peter Eisentraut | 2020-01-08 20:48:44 +0000 |
|---|---|---|
| committer | Peter Eisentraut | 2020-01-08 21:47:22 +0000 |
| commit | 45223fd9cefe483daa4af7740f15c004486636eb (patch) | |
| tree | cd00580944d074ca0e22aad5fde3a79d58d5f274 /src/tools | |
| parent | 37f21ed132d1c5aee88e81fee0a0b7e735673d35 (diff) | |
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
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/msvc/vcregress.pl | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 8a0f132199f..7915ee79256 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -290,7 +290,6 @@ sub mangle_plpython3 close($handle); do { - s/except ([[:alpha:]][[:alpha:].]*), *([[:alpha:]][[:alpha:]]*):/except $1 as $2:/g; s/<type 'exceptions\.([[:alpha:]]*)'>/<class '$1'>/g; s/<type 'long'>/<class 'int'>/g; s/([0-9][0-9]*)L/$1/g; |
