From: Karl O. Pinc Date: Tue, 5 Mar 2024 21:00:33 +0000 (-0600) Subject: Do not rely on exceptions supporting the slice operation X-Git-Url: https://papio.biology.duke.edu/gitweb/?a=commitdiff_plain;h=267e44b39c5ae5e63957fd22203cf5ab7956dd61;p=pgwui_common Do not rely on exceptions supporting the slice operation --- diff --git a/src/pgwui_common/templates/errors_base.mak b/src/pgwui_common/templates/errors_base.mak index 333735e..ee4f0ac 100644 --- a/src/pgwui_common/templates/errors_base.mak +++ b/src/pgwui_common/templates/errors_base.mak @@ -93,7 +93,7 @@ if hasattr(error, 'descr') and error.descr: # We really do want to do this formatting here instead of in # the error handler. - if error.e[-1] == ':': + if str(error.e)[-1] == ':': descr = ' ' + error.descr else: descr = ': ' + error.descr