Commit b54b929b authored by Fred Drake's avatar Fred Drake

Do not assume that types.UnicodeType exists; we might be running in an old

version of Python.  ;-(
parent 9742d86c
...@@ -7,7 +7,11 @@ import os, urlparse, urllib, types ...@@ -7,7 +7,11 @@ import os, urlparse, urllib, types
import handler import handler
import xmlreader import xmlreader
_StringTypes = [types.StringType, types.UnicodeType] try:
_StringTypes = [types.StringType, types.UnicodeType]
except AttributeError:
_StringTypes = [types.StringType]
def escape(data, entities={}): def escape(data, entities={}):
"""Escape &, <, and > in a string of data. """Escape &, <, and > in a string of data.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment