Skip to content

Commit d478786

Browse files
committed
Fix a bug in the IANA changes logging, fix spelling mistake, remove
debug print - Legacy-Id: 4882
1 parent 91bea25 commit d478786

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ietf/sync/iana.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ def parse_changes_json(text):
9393

9494
def update_history_with_changes(changes, send_email=True):
9595
"""Take parsed changes from IANA and apply them. Note that we
96-
expect to get these in chronologically sorted, otherwise the
97-
change descriptions generated may not be right."""
96+
expect to get these chronologically sorted, otherwise the change
97+
descriptions generated may not be right."""
9898

9999
# build up state lookup
100100
states = {}
@@ -162,7 +162,6 @@ def update_history_with_changes(changes, send_email=True):
162162

163163
if c["state"] not in states[kind]:
164164
warnings.append("Unknown IANA %s state %s (%s)" % (kind, c["state"], timestamp))
165-
print "Unknown IANA %s state %s" % (kind, c["state"])
166165
continue
167166

168167
state = states[kind][c["state"]]
@@ -183,7 +182,8 @@ def update_history_with_changes(changes, send_email=True):
183182
prev_state = doc.get_state(state_type)
184183
e = add_state_change_event(doc, system, prev_state, state, timestamp)
185184

186-
added_events.append(e)
185+
if e:
186+
added_events.append(e)
187187

188188
if not StateDocEvent.objects.filter(doc=doc, time__gt=timestamp, state_type=state_type):
189189
save_document_in_history(doc)

0 commit comments

Comments
 (0)