changeset 1398:fe8facfcb439

avoid trouble when write data contains None, just skip it - thanks to Juergen Hermann for patch
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 21 Aug 2006 21:07:36 +0200
parents 3b527a26aa1f
children 4f591cf4f1c6
files MoinMoin/request/__init__.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/request/__init__.py	Mon Aug 21 21:04:28 2006 +0200
+++ b/MoinMoin/request/__init__.py	Mon Aug 21 21:07:36 2006 +0200
@@ -779,6 +779,8 @@
                 if isinstance(d, unicode):
                     # if we are REALLY sure, we can use "strict"
                     d = d.encode(config.charset, 'replace')
+                elif d is None:
+                    continue
                 wd.append(d)
             except UnicodeError:
                 self.log("Unicode error on: %s" % repr(d))