From d47878656f8cac57a3fc86ab63ade66944cc6b51 Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Mon, 24 Sep 2012 11:53:30 +0000 Subject: [PATCH] Fix a bug in the IANA changes logging, fix spelling mistake, remove debug print - Legacy-Id: 4882 --- ietf/sync/iana.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ietf/sync/iana.py b/ietf/sync/iana.py index df8ad6d1d..f588fb02d 100644 --- a/ietf/sync/iana.py +++ b/ietf/sync/iana.py @@ -93,8 +93,8 @@ def parse_changes_json(text): def update_history_with_changes(changes, send_email=True): """Take parsed changes from IANA and apply them. Note that we - expect to get these in chronologically sorted, otherwise the - change descriptions generated may not be right.""" + expect to get these chronologically sorted, otherwise the change + descriptions generated may not be right.""" # build up state lookup states = {} @@ -162,7 +162,6 @@ def update_history_with_changes(changes, send_email=True): if c["state"] not in states[kind]: warnings.append("Unknown IANA %s state %s (%s)" % (kind, c["state"], timestamp)) - print "Unknown IANA %s state %s" % (kind, c["state"]) continue state = states[kind][c["state"]] @@ -183,7 +182,8 @@ def update_history_with_changes(changes, send_email=True): prev_state = doc.get_state(state_type) e = add_state_change_event(doc, system, prev_state, state, timestamp) - added_events.append(e) + if e: + added_events.append(e) if not StateDocEvent.objects.filter(doc=doc, time__gt=timestamp, state_type=state_type): save_document_in_history(doc)