Don't crash if data source unreachable

Closes gh-26.
This commit is contained in:
gfyoung
2017-05-18 00:12:21 -04:00
parent c0196ce5dc
commit 8cb610a757

View File

@@ -297,9 +297,9 @@ def update_all_sources():
print("Updating source " + os.path.dirname(
source) + " from " + update_url)
updated_file = get_file_by_url(update_url)
try:
updated_file = get_file_by_url(update_url)
# get rid of carriage-return symbols
updated_file = updated_file.replace("\r", "")
@@ -309,7 +309,7 @@ def update_all_sources():
write_data(hosts_file, updated_file)
hosts_file.close()
except:
print("Skipping.")
print("Error in updating source: ", update_url)
# End Update Logic