diff options
-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) |