diff bitsyblog/bitsyblog.py @ 66:0f25fe665367

except unicode errors too
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 12 Jun 2010 09:46:36 -0700
parents e3c72e2c881e
children f6a6a4b072e7
line wrap: on
line diff
--- a/bitsyblog/bitsyblog.py	Tue Apr 13 13:59:43 2010 -0700
+++ b/bitsyblog/bitsyblog.py	Sat Jun 12 09:46:36 2010 -0700
@@ -646,7 +646,7 @@
                                                 writer_name='html',
                                                 settings_overrides=settings)
             body = parts['body']
-        except SystemMessage, e:
+        except (SystemMessage, UnicodeError), e:
             lines = [ cgi.escape(i.strip()) for i in string.split('\n') ]
             body = '<br/>\n'.join(lines)