From ea07716d32c57459ded2889317aec95be3460522 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Wed, 10 Oct 2012 18:01:39 -0400 Subject: [PATCH] Rename instance to subject. (imported from commit 6b4693da03f106448c137cf81cf9801cac44f2b8) --- zephyr_mirror.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zephyr_mirror.py b/zephyr_mirror.py index 63777e8..60eb4e9 100644 --- a/zephyr_mirror.py +++ b/zephyr_mirror.py @@ -66,8 +66,8 @@ def send_humbug(zeph): zeph["sender"] = compute_humbug_username(zeph["sender"]) zeph['fullname'] = username_to_fullname(zeph['sender']) zeph['shortname'] = zeph['sender'].split('@')[0] - if "instance" in zeph: - zeph["instance"] = zeph["instance"][:30] + if "subject" in zeph: + zeph["subject"] = zeph["subject"][:30] for key in zeph.keys(): if isinstance(zeph[key], unicode): @@ -157,7 +157,7 @@ def process_loop(log): 'time' : str(notice.time), 'sender' : sender, 'stream' : notice.cls.lower(), - 'instance' : notice.instance.lower(), + 'subject' : notice.instance.lower(), 'zsig' : zsig, # logged here but not used by app 'content' : body } @@ -224,7 +224,7 @@ def forward_to_zephyr(message): if message['type'] == "stream": zeph = zephyr.ZNotice(sender=message["sender_email"].replace("mit.edu", "ATHENA.MIT.EDU"), auth=True, cls=message["display_recipient"], - instance=message["instance"]) + instance=message["subject"]) body = "%s\0%s" % (zsig, wrapped_content) zeph.setmessage(body) zeph.send()