diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-01 10:51:37 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-12-01 10:51:37 +0200 |
commit | cac7ec485bec824d84065ac8ebff789c45c26a7b (patch) | |
tree | a4e954693c5696f58f66051cbe9918ae47810db8 /Tools/scripts/gprof2html.py | |
parent | ac4aa7b6aad76b404ed1e695b3130988d87fb39f (diff) | |
parent | 7a1104d292cccb563e5bba73d218de08a91d961a (diff) | |
download | cpython-git-cac7ec485bec824d84065ac8ebff789c45c26a7b.tar.gz |
Issue #22924: Scripts gprof2html.py and highlight.py now use html.escape()
instead of deperecated cgi.escape(). Original patch by Raymond Hettinger.
Diffstat (limited to 'Tools/scripts/gprof2html.py')
-rwxr-xr-x | Tools/scripts/gprof2html.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Tools/scripts/gprof2html.py b/Tools/scripts/gprof2html.py index ad828358c1..4ca705c3c6 100755 --- a/Tools/scripts/gprof2html.py +++ b/Tools/scripts/gprof2html.py @@ -2,7 +2,11 @@ """Transform gprof(1) output into useful HTML.""" -import re, os, sys, cgi, webbrowser +import html +import os +import re +import sys +import webbrowser header = """\ <html> @@ -22,7 +26,7 @@ trailer = """\ def add_escapes(filename): with open(filename) as fp: for line in fp: - yield cgi.escape(line) + yield html.escape(line) def main(): |