diff options
author | Jeffrey C. Ollie <jeff@ocjtech.us> | 2008-12-15 14:52:16 -0600 |
---|---|---|
committer | Jeffrey C. Ollie <jeff@ocjtech.us> | 2008-12-15 14:52:16 -0600 |
commit | 41a6f66811c18cdf3c17f3bd374d5a8a1f580ba8 (patch) | |
tree | ecee18899005cf7be1caee390cb20b878c4a98a0 | |
parent | 5d11ab7da50c9334d616878890e96569ca5e2fab (diff) | |
download | cvsmessaging-41a6f66811c18cdf3c17f3bd374d5a8a1f580ba8.tar.gz cvsmessaging-41a6f66811c18cdf3c17f3bd374d5a8a1f580ba8.tar.xz cvsmessaging-41a6f66811c18cdf3c17f3bd374d5a8a1f580ba8.zip |
Some minor bugfixes and cleanups.
-rwxr-xr-x | loginfo-consumer | 7 | ||||
-rwxr-xr-x | loginfo-producer | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/loginfo-consumer b/loginfo-consumer index 332d7e8..edab648 100755 --- a/loginfo-consumer +++ b/loginfo-consumer @@ -20,6 +20,7 @@ import os import re import smtplib +import socket from qpid.util import connect from qpid.connection import Connection @@ -69,8 +70,8 @@ def append_package_owner_email(directory, recipients): host = '127.0.0.1' port = 5672 -socket = connect(host, port) -connection = Connection (sock=socket) +sock = connect(host, port) +connection = Connection(sock = sock) connection.start() session = connection.session(str(uuid4())) @@ -120,7 +121,7 @@ while True: email_recipients = [] for notification_element in root_element.xpath('/loginfo/notifications/notification'): - notification = email_element.text + notification = notification_element.text if notification == u'%%OWNER%%': append_package_owner_email(directory, email_recipients) else: diff --git a/loginfo-producer b/loginfo-producer index 7195213..e4c6b8b 100755 --- a/loginfo-producer +++ b/loginfo-producer @@ -63,7 +63,7 @@ cvsroot_element.text = cvsroot notifications_element = etree.SubElement(root_element, 'notifications') for arg in sys.argv[2:]: - notification_element = etree.SubElement(notification_element, 'notification') + notification_element = etree.SubElement(notifications_element, 'notification') notification_element.text = arg directory_re = re.compile(r'^Update of %s/(.*)$' % (cvsroot,), re.M) |