summaryrefslogtreecommitdiffstats
path: root/Lib/http/server.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/http/server.py')
-rw-r--r--Lib/http/server.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/http/server.py b/Lib/http/server.py
index 2d74b95..fa204fb 100644
--- a/Lib/http/server.py
+++ b/Lib/http/server.py
@@ -1164,8 +1164,9 @@ class CGIHTTPRequestHandler(SimpleHTTPRequestHandler):
while select.select([self.rfile], [], [], 0)[0]:
if not self.rfile.read(1):
break
- if sts:
- self.log_error("CGI script exit status %#x", sts)
+ exitcode = os.waitstatus_to_exitcode(sts)
+ if exitcode:
+ self.log_error(f"CGI script exit code {exitcode}")
return
# Child
try: