Skip to content
This repository has been archived by the owner on Apr 1, 2022. It is now read-only.

Commit

Permalink
catch exeptions while downloading bview file
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Dec 19, 2012
1 parent f73a088 commit 31654da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/fetch_historical_bviews.py
Expand Up @@ -73,7 +73,10 @@ def downloadURL(url, filename):
"""
path_temp_bviewfile = os.path.join(c.raw_data, c.bview_dir, 'tmp', filename)
path_bviewfile = os.path.join(c.raw_data, c.bview_dir, filename)
f = urllib.urlopen(url)
try:
f = urllib.urlopen(url)
except:
return False
if f.getcode() != 200:
publisher.warning('{} unavailable, code: {}'.format(url, f.getcode()))
return False
Expand Down

0 comments on commit 31654da

Please sign in to comment.