summaryrefslogtreecommitdiff
path: root/src/pl/plpython/sql
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2018-02-13 16:13:20 -0500
committerPeter Eisentraut <peter_e@gmx.net>2018-05-05 23:48:19 -0400
commitb812d63725724ed33c535e7643703c7f2f6aa7c5 (patch)
tree8d1157ff3c5f047ab3cce6209cfafadec0bf83c4 /src/pl/plpython/sql
parent3a934331722a8d65242e9a39aa5533a58f3b7d17 (diff)
Tweak tests to support Python 3.7
Python 3.7 removes the trailing comma in the repr() of BaseException (see <https://bugs.python.org/issue30399>), leading to test output differences. Work around that by composing the equivalent test output in a more manual way.
Diffstat (limited to 'src/pl/plpython/sql')
-rw-r--r--src/pl/plpython/sql/plpython_subtransaction.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pl/plpython/sql/plpython_subtransaction.sql b/src/pl/plpython/sql/plpython_subtransaction.sql
index 3c188e3dd2d..398c65720ce 100644
--- a/src/pl/plpython/sql/plpython_subtransaction.sql
+++ b/src/pl/plpython/sql/plpython_subtransaction.sql
@@ -80,7 +80,7 @@ with plpy.subtransaction():
except plpy.SPIError, e:
if not swallow:
raise
- plpy.notice("Swallowed %r" % e)
+ plpy.notice("Swallowed %s(%r)" % (e.__class__.__name__, e.args[0]))
return "ok"
$$ LANGUAGE plpythonu;