@@ -93,8 +93,8 @@ def parse_changes_json(text):
9393
9494def 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