Skip to content
Snippets Groups Projects
Commit ceef3652 authored by Borja Sorazu's avatar Borja Sorazu
Browse files

further work on capturing network exceptions

parent 48320cbc
No related branches found
No related tags found
No related merge requests found
......@@ -14,9 +14,12 @@ def statusdetect():
r =requests.get(url)
except:
print ('ERROR: Issues requesting website: ' + url + '\n')
r=''
pass
soup = BeautifulSoup(r.text,"lxml")
if hasattr(r, 'text'):
soup = BeautifulSoup(r.text,"lxml")
else:
soup = BeautifulSoup(r,"lxml")
names = ['GEO 600','LIGO Hanford','LIGO Livingston','Virgo','KAGRA']
detrows = []
to_add=[]
......
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