changeset 74:2c219b788648

dont let handlers kill the blog
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 15 Sep 2010 10:34:14 -0700
parents e6055bf127eb
children c690198a2625
files bitsyblog/bitsyblog.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/bitsyblog/bitsyblog.py
+++ b/bitsyblog/bitsyblog.py
@@ -340,17 +340,20 @@ class BitsyBlog(object):
         # write the file
         now = utils.datestamp(datetime.datetime.now())
         location = self.user_url(request, user, now, permalink=True)
         blog_entry = self.blog.post(user, now, body, privacy)
 
         # fire event handlers
         # XXX could be done asynchronously
         for handler in self.handlers:
+          try:
             handler(blog_entry, location)
+          except:
+            pass
 
         # point the user at the post
         return exc.HTTPSeeOther("Post blogged by bitsy", location=location)
 
     def put(self, request):
         """
         PUT several blog entries from a file
         """