* Fix an off-by-one error when splitting an email in headers and body.
authorMatthijs Kooijman <matthijs@stdin.nl>
Fri, 1 Feb 2008 09:24:05 +0000 (10:24 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Fri, 1 Feb 2008 09:24:05 +0000 (10:24 +0100)
tools/notify.py

index 08bc47761f82f8247a19896f07ea9573d753a14e..8dca1ba081ae551f70da5ddee9633fefecc436be 100644 (file)
@@ -23,7 +23,7 @@ def notify(recipients, template, context = {}):
     context['addresses'] = addresses 
 
     rendered = loader.render_to_string(template, context)
-    (headers, body) = rendered.split('\n\n', 2)
+    (headers, body) = rendered.split('\n\n', 1)
 
     # Turn the headers into a dict so EmailMessage can turn them into a
     # string again. Bit pointless, but it works.