Merge pull request #916 from honuonhval/patch-depre-cgi

Allow import cgi on older python versions
This commit is contained in:
David Kennedy 2022-01-25 20:58:47 -05:00 committed by GitHub
commit 3611133a5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,11 @@ import sys
import html
import os
import re
import cgi
try:
from cgi import escape
except ImportError:
from html import escape
# need for python2 -> 3
try:
@ -332,7 +336,7 @@ class SETHandler(BaseHTTPRequestHandler):
else:
line = ""
counter = 1
filewrite.write(html.escape("PARAM: " + line + "\n"))
filewrite.write(escape("PARAM: " + line + "\n"))
filewrite2.write(line + "\n")
# if a counter hits at 0 then print this line
if counter == 0: