Skip to content

Commit

Permalink
Fix isapi.ThreadPoolExtension's printing of exception traceback bro…
Browse files Browse the repository at this point in the history
…ken on Python 3.8+
  • Loading branch information
Avasam committed Jul 22, 2024
1 parent a9010f3 commit 249c8bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Coming in build 307, as yet unreleased
--------------------------------------

### pywin32
* Fix `isapi.ThreadPoolExtension`'s printing of exception traceback broken on Python 3.8+ (#2312, @Avasam)
* Add RealGetWindowClass (#2299, @CristiFati)
* Make it compile on Python 3.13 (#2260, @clin1234)
* Fixed accidentally trying to raise a `str` instead of an `Exception` in (#2270, @Avasam)
Expand Down
6 changes: 3 additions & 3 deletions isapi/threaded_extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def HandleDispatchError(self, ecb):
limit = None
try:
try:
import cgi
import html

ecb.SendResponseHeaders(
"200 OK", "Content-type: text/html\r\n\r\n", False
Expand All @@ -169,8 +169,8 @@ def HandleDispatchError(self, ecb):
bold = list.pop()
print(
"<PRE>{}<B>{}</B></PRE>".format(
cgi.escape("".join(list)),
cgi.escape(bold),
html.escape("".join(list)),
html.escape(bold),
),
file=ecb,
)
Expand Down

0 comments on commit 249c8bc

Please sign in to comment.