Commits

Anonymous committed a740e5a

0.12.3dev: for db connection errors, also show the error in clear text for Python 2.4 (follow-up to r10461).

Closes #10024.

Comments (0)

Files changed (1)

 
 from trac.db.util import ConnectionWrapper
 from trac.util.concurrency import threading
+from trac.util.text import exception_to_unicode
 from trac.util.translation import _
 
 
         errmsg = _("Unable to get database connection within %(time)d seconds.",
                    time=timeout)
         if err:
-            errmsg += " (%r)" % err
+            errmsg += " (%s)" % exception_to_unicode(err)
         raise TimeoutError(errmsg)
 
     def _take_cnx(self, connector, kwargs, key, tid):