Skip to content

Commit 0c15759

Browse files
committed
Modifies import of escape to reflect removal from the cgi module in python3.8
1 parent 83e9b96 commit 0c15759

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎lib/python/mod_python/psp.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@
2525
import os
2626
import marshal
2727
import types
28-
from cgi import escape
2928
import dbm, dbm
3029
import tempfile
30+
try:
31+
from html import escape
32+
except:
33+
from cgi import escape
3134

3235
PY2 = sys.version[0] == '2'
3336

0 commit comments

Comments
 (0)