This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: logging.exception() does not allow empty string
Type: Stage:
Components: Extension Modules Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: dimaq, georg.brandl, vinay.sajip
Priority: normal Keywords:

Created on 2007-06-15 14:50 by dimaq, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg32332 - (view) Author: Dmitrii Tisnek (dimaq) Date: 2007-06-15 14:50
Due to the following code, logging.exception("") does not work. I suggest replacing s[-1]=="\n" with s.endswith("\n").

logging/__init__.py:formatException():
--snip--
        if s[-1] == "\n":
            s = s[:-1]
        return s
msg32333 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-06-15 16:39
Sounds reasonable.
msg32334 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-06-19 12:36
Fixed in rev. 56038, 56039 (2.5).
History
Date User Action Args
2022-04-11 14:56:24adminsetgithub: 45096
2007-06-15 14:50:55dimaqcreate