File: remove-cgi

package info (click to toggle)
qpid-proton 0.37.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 18,316 kB
  • sloc: ansic: 37,828; cpp: 37,140; python: 15,302; ruby: 6,018; xml: 477; sh: 320; pascal: 52; makefile: 18
file content (24 lines) | stat: -rw-r--r-- 1,199 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Index: qpid-proton/python/tests/proton_tests/main.py
===================================================================
--- qpid-proton.orig/python/tests/proton_tests/main.py	2024-10-11 18:00:45.679506945 +0000
+++ qpid-proton/python/tests/proton_tests/main.py	2024-10-11 18:04:30.999986840 +0000
@@ -26,7 +26,7 @@
 import time
 import traceback
 import types
-import cgi
+import html
 from fnmatch import fnmatchcase as match
 from logging import getLogger, StreamHandler, Formatter, Filter, \
     WARN, DEBUG, ERROR, INFO
@@ -234,8 +234,8 @@
         module = '.'.join(parts[0:-1])
         self.f.write('<testcase classname="%s" name="%s" time="%f">\n' % (module, method, result.time))
         if result.failed:
-            escaped_type = cgi.escape(str(result.exception_type))
-            escaped_message = cgi.escape(str(result.exception_message))
+            escaped_type = html.escape(str(result.exception_type))
+            escaped_message = html.escape(str(result.exception_message))
             self.f.write('<failure type="%s" message="%s">\n' % (escaped_type, escaped_message))
             self.f.write('<![CDATA[\n')
             self.f.write(result.formatted_exception_trace)