Debian Codegraph @

debian/patches/remove-cgi

raw
1 Index: qpid-proton/python/tests/proton_tests/main.py
2 ===================================================================
3 --- qpid-proton.orig/python/tests/proton_tests/main.py 2024-10-11 18:00:45.679506945 +0000
4 +++ qpid-proton/python/tests/proton_tests/main.py 2024-10-11 18:04:30.999986840 +0000
5 @@ -26,7 +26,7 @@
6 import time
7 import traceback
8 import types
9 -import cgi
10 +import html
11 from fnmatch import fnmatchcase as match
12 from logging import getLogger, StreamHandler, Formatter, Filter, \
13 WARN, DEBUG, ERROR, INFO
14 @@ -234,8 +234,8 @@
15 module = '.'.join(parts[0:-1])
16 self.f.write('<testcase classname="%s" name="%s" time="%f">\n' % (module, method, result.time))
17 if result.failed:
18 - escaped_type = cgi.escape(str(result.exception_type))
19 - escaped_message = cgi.escape(str(result.exception_message))
20 + escaped_type = html.escape(str(result.exception_type))
21 + escaped_message = html.escape(str(result.exception_message))
22 self.f.write('<failure type="%s" message="%s">\n' % (escaped_type, escaped_message))
23 self.f.write('<![CDATA[\n')
24 self.f.write(result.formatted_exception_trace)