Skip to content

Commit

Permalink
Merge branch 'fix/2.2.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
exhuma committed Apr 7, 2024
2 parents 00cb8a8 + 8c9ffe6 commit a1e79cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Version 2.2
This helps reading tracebacks when using complex frameworks (like SQLAlchemy,
Flask, Starlette, ...).

* [2.2.1] - fix: If the message or traceback contained Python string-template
variables the output could either break or cause incorrect output. This is
now fixed.

Version 2.1
-----------

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "gouge"
version = "2.2"
version = "2.2.1"
authors = [
{name = "Michel Albert", email = "michel@albert.lu"},
]
Expand Down
2 changes: 2 additions & 0 deletions src/gouge/colourcli.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ def format(self, record: LogRecord) -> str:

def formatException(self, exc_info: tuple) -> str:
exc_text = super().formatException(exc_info)
if "{" in exc_text or "}" in exc_text:
exc_text = exc_text.replace("{", "{{").replace("}", "}}")
if self.highlighted_path is None:
return exc_text

Expand Down

0 comments on commit a1e79cf

Please sign in to comment.