1- import re , urllib , urllib2 , json , email , socket , base64
1+ import re
2+ import base64
3+ import datetime
4+ import urllib
5+ import urllib2
6+ import socket
27from xml .dom import pulldom , Node
38
4- from django .utils . http import urlquote
9+ from django .conf import settings
510
6- from ietf .utils .mail import send_mail_text
7- from ietf .utils .log import log
8-
9- from ietf .doc .models import *
10- from ietf .person .models import *
11- from ietf .name .models import *
12- from ietf .doc .utils import add_state_change_event
11+ from ietf .doc .models import ( Document , DocAlias , State , StateType , DocEvent , DocRelationshipName ,
12+ DocTagName , DocTypeName , RelatedDocument , save_document_in_history )
1313from ietf .doc .expire import move_draft_files_to_archive
14+ from ietf .doc .utils import add_state_change_event
15+ from ietf .group .models import Group
16+ from ietf .name .models import StdLevelName , StreamName
17+ from ietf .person .models import Person
18+ from ietf .utils .log import log
19+ from ietf .utils .mail import send_mail_text
1420
1521#QUEUE_URL = "http://www.rfc-editor.org/queue2.xml"
1622#INDEX_URL = "http://www.rfc-editor.org/rfc/rfc-index.xml"
@@ -34,6 +40,7 @@ def parse_queue(response):
3440 events = pulldom .parse (response )
3541 drafts = []
3642 warnings = []
43+ stream = None
3744
3845 for event , node in events :
3946 if event == pulldom .START_ELEMENT and node .tagName == "entry" :
@@ -322,7 +329,6 @@ def update_docs_from_rfc_index(data, skip_older_than_date=None):
322329 # attributes take precedence over our local attributes)
323330
324331 # make sure we got the document and alias
325- created = False
326332 doc = None
327333 name = "rfc%s" % rfc_number
328334 a = DocAlias .objects .filter (name = name ).select_related ("document" )
@@ -342,9 +348,7 @@ def update_docs_from_rfc_index(data, skip_older_than_date=None):
342348 # add alias
343349 DocAlias .objects .get_or_create (name = name , document = doc )
344350 results .append ("created alias %s to %s" % (name , doc .name ))
345- created = True
346351
347-
348352 # check attributes
349353 changed_attributes = {}
350354 changed_states = []
0 commit comments