Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions retriever/lib/socrata.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def socrata_autocomplete_search(dataset):
for i in range(len(datasets["results"])):
names.append(datasets["results"][i]["title"])

except HTTPError as e:
print("HTTPError :", e)
except (HTTPError, requests.exceptions.ConnectionError) as e:
print("Error Occured: ", e)
return None

return names
Expand Down Expand Up @@ -77,8 +77,8 @@ def socrata_dataset_info(dataset_name):
"link": result[i]["link"]
})

except HTTPError as e:
print("HTTPError : ", e)
except (HTTPError, requests.exceptions.ConnectionError) as e:
print("Error Occured: ", e)
return None

return resources
Expand Down Expand Up @@ -129,8 +129,8 @@ def find_socrata_dataset_by_id(dataset_id):
print("No socrata dataset exists for the id : {dataset_id}".format(
dataset_id=dataset_id))

except HTTPError as e:
print("HTTPError : ", e)
except (HTTPError, requests.exceptions.ConnectionError) as e:
print("Error Occured: ", e)
return {}

return resource
Expand Down