Skip to content

Commit 65d6b91

Browse files
committed
More cgi.escape/html.escape fixes.
1 parent 1b26162 commit 65d6b91

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

roundup/backends/sessions_dbm.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88

99
import os, marshal, time
1010

11-
from cgi import escape
11+
try:
12+
from html import escape
13+
except ImportError:
14+
from cgi import escape
15+
1216
from roundup import hyperdb
1317
from roundup.i18n import _
1418
from roundup.anypy.dbm_ import anydbm, whichdb

roundup/backends/sessions_rdbms.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
"""
77
__docformat__ = 'restructuredtext'
88
import os, time, logging
9-
from cgi import escape
9+
10+
try:
11+
from html import escape
12+
except ImportError:
13+
from cgi import escape
1014

1115
class BasicDatabase:
1216
''' Provide a nice encapsulation of an RDBMS table.

0 commit comments

Comments
 (0)