Changed exception for incorrect single request
This commit is contained in:
parent
7a287b64c4
commit
3b4eddfec3
@ -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
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user