Changed additional places to use IANA sync settings from settings.py

- Legacy-Id: 5681
This commit is contained in:
Henrik Levkowetz 2013-04-21 15:57:56 +00:00
parent 53b1719860
commit f2c4ed9f24
2 changed files with 5 additions and 5 deletions

View file

@ -46,7 +46,7 @@ syslog.openlog(os.path.basename(__file__), syslog.LOG_PID, syslog.LOG_USER)
from ietf.sync.iana import *
syslog.syslog("Updating history log with new changes from IANA from %s, period %s - %s" % (CHANGES_URL, start, end))
syslog.syslog("Updating history log with new changes from IANA from %s, period %s - %s" % (settings.IANA_SYNC_CHANGES_URL, start, end))
t = start
while t < end:
@ -54,7 +54,7 @@ while t < end:
# period, so loop over the requested period and make multiple
# requests if necessary
text = fetch_changes_json(CHANGES_URL, t, min(end, t + MAX_INTERVAL_ACCEPTED_BY_IANA))
text = fetch_changes_json(settings.IANA_SYNC_CHANGES_URL, t, min(end, t + MAX_INTERVAL_ACCEPTED_BY_IANA))
changes = parse_changes_json(text)
added_events, warnings = update_history_with_changes(changes, send_email=options.send_email)

View file

@ -9,11 +9,11 @@ from ietf.person.models import *
from ietf.idrfc.mails import email_owner, email_state_changed, email_authors
from ietf.utils.timezone import *
PROTOCOLS_URL = "http://www.iana.org/protocols/"
CHANGES_URL = "http://datatracker.dev.icann.org:8080/data-tracker/changes"
#PROTOCOLS_URL = "http://www.iana.org/protocols/"
#CHANGES_URL = "http://datatracker.dev.icann.org:8080/data-tracker/changes"
def fetch_protocol_page(url):
f = urllib2.urlopen(PROTOCOLS_URL)
f = urllib2.urlopen(settings.IANA_SYNC_PROTOCOLS_URL)
text = f.read()
f.close()
return text