Commit d57cfe10 authored by kpetersn's avatar kpetersn
Browse files

Handle IOError when opening URL.

parent 1c4e2f9c
......@@ -59,7 +59,12 @@ ioc_list = {}
# Get the xml file
#!print "Opening URL"
f = urllib.urlopen(alive_url)
try:
f = urllib.urlopen(alive_url)
except IOError:
print "Couldn't open URL"
sys.exit(1)
#!print "Reading XML from URL"
xml_string = f.read()
#!print "Closing URL"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment