Browse Source

update old code to update database

master
wes 9 years ago
parent
commit
38d03a59c1
  1. 5
      src/goasearch.py

5
src/goasearch.py

@ -1,7 +1,8 @@
#! /usr/bin/python2 #! /usr/bin/python2
from search import indexListing from search import indexListing
from textbookExceptions import UnIndexable from textbookExceptions import UnIndexable
from mcmaster.classes import allCourses, classToJSON, indexListing from mcmaster.classes import allCourses
from search import indexListing, createIndex
from itertools import imap from itertools import imap
try: try:
@ -11,7 +12,7 @@ except Exception as e:
print e print e
print "Downloading course info" print "Downloading course info"
for c in imap(classToJSON, allCourses()): for c in allCourses():
try: try:
print indexListing(c) print indexListing(c)
except UnIndexable as e: except UnIndexable as e:

Loading…
Cancel
Save