[Twisted-web] using nevow with python2.2
James Y Knight
twisted-web@twistedmatrix.com
Wed, 17 Dec 2003 19:13:18 -0500
A patch over my previous patch -- I should've replaced basestring with
StringTypes, not StringType, in order accommodate unicode strings.
James
--- serial/flatstan.py~ Wed Dec 17 19:06:04 2003
+++ serial/flatstan.py Wed Dec 17 19:06:08 2003
@@ -4,7 +4,7 @@
# Public License as published by the Free Software Foundation.
from __future__ import generators
-from types import StringType
+from types import StringTypes
import types
import warnings
@@ -51,7 +51,7 @@
flat =
flatten(ISerializable(v).serialize(context, stream))
if flat:
val = flat[0]
- if isinstance(val, StringType):
+ if isinstance(val, StringTypes):
val = val.replace('"', '"')
yield xml(val)
yield xml('"')