Skip to content

Commit 951c443

Browse files
committed
fix error catch
1 parent 8effbd8 commit 951c443

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

regcensus/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def get_values(series, jurisdiction, date, filtered=True, summary=True,
129129
# Puts flattened JSON output into a pandas DataFrame
130130
output = pd.io.json.json_normalize(requests.get(url_call).json())
131131
# Prints error message if call fails
132-
if (output.columns == ['title', 'status', 'detail']).all():
132+
if (output.columns[:3] == ['title', 'status', 'detail']).all():
133133
print('WARNING:', output.iloc[0][-1])
134134
# Returns clean data if no error
135135
else:

0 commit comments

Comments
 (0)