Do not rely on exceptions supporting the slice operation
authorKarl O. Pinc <kop@karlpinc.com>
Tue, 5 Mar 2024 21:00:33 +0000 (15:00 -0600)
committerKarl O. Pinc <kop@karlpinc.com>
Tue, 5 Mar 2024 21:00:33 +0000 (15:00 -0600)
src/pgwui_common/templates/errors_base.mak

index 333735e2acd5a1acbba0054c5377bcf03d04c3fb..ee4f0ac6367927830981e6b307c6ab3bb168a7de 100644 (file)
@@ -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