summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey C. Ollie <jeff@ocjtech.us>2008-12-04 16:23:52 -0600
committerJeffrey C. Ollie <jeff@ocjtech.us>2008-12-04 16:23:52 -0600
commit0f8301b3f6fef02cbb5d0ef58323dfad28f4aacd (patch)
tree6daf50c3f73b8cc9461fe402fc313c68c7738fd2
parent6376d8df35d8643d578e8d4662b1cd2771098b97 (diff)
downloadcvsmessaging-0f8301b3f6fef02cbb5d0ef58323dfad28f4aacd.tar.gz
cvsmessaging-0f8301b3f6fef02cbb5d0ef58323dfad28f4aacd.tar.xz
cvsmessaging-0f8301b3f6fef02cbb5d0ef58323dfad28f4aacd.zip
Build the body of the email message
-rwxr-xr-xloginfo-consumer11
1 files changed, 11 insertions, 0 deletions
diff --git a/loginfo-consumer b/loginfo-consumer
index f078231..4359c00 100755
--- a/loginfo-consumer
+++ b/loginfo-consumer
@@ -67,6 +67,12 @@ while True:
cvsroot = root_element.xpath('/loginfo/cvsroot')[0].text
directory = root_element.xpath('/loginfo/directory')[0].text
+ username = root_element.xpath('/loginfo/username')[0].text
+ fullname = root_element.xpath('/loginfo/fullname')[0].text
+
+ email_body = u'Author: "%s" <%s@fedoraproject.org>\n\n' % (username, fullname)
+ email_body += root_element.xpath('/loginfo/message')[0].text
+ email_body += '\n\n'
for file_element in root_element.xpath('/loginfo/files/file'):
filename = file_element.xpath('filename')[0].text
@@ -77,8 +83,13 @@ while True:
diff_element = etree.SubElement(file_element, 'diff')
diff_element.text = diff
+ email_body += diff
+ email_body += '\n\n'
+
session.message_accept(RangedSet(message.id))
+ print email_body
+
print etree.tostring(root_element, pretty_print = True)
except Empty: