Skip to content
Snippets Groups Projects
Commit c008ab5f authored by Chad Hanna's avatar Chad Hanna
Browse files

aggregator.py: handle URL error

parent c068a8a0
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,11 @@ def get_url(url,d):
A function to pull data from @param url where @param d specifies a
specific route. FIXME it assumes that the routes end in .txt
"""
jobdata = urllib2.urlopen("%s%s.txt" % (url, d)).read().split("\n")
try:
jobdata = urllib2.urlopen("%s%s.txt" % (url, d)).read().split("\n")
except urllib2.HTTPError as e:
logging.error("%s : %s" % (url, str(e)))
return
data = []
for line in jobdata:
if line:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment