Changed exception for incorrect single request

This commit is contained in:
Samuel Roach 2022-07-06 22:26:21 +01:00
parent 7a287b64c4
commit 3b4eddfec3

View File

@ -257,7 +257,8 @@ class Ergast():
items = self._get_items(get_items, construct_items) items = self._get_items(get_items, construct_items)
if len(items) == 1: if len(items) == 1:
return items[0] return items[0]
raise Warning("More than 1 element found") raise Exception(f'Data loss will occur with this query. 1 item' \
f' requested but {len(items)} found.')
# Race and Results Queries # Race and Results Queries