Skip to content

Commit e3d25e8

Browse files
sujaymansinghhonzakral
authored andcommitted
[elastic#256] Fix exception message
* Typo: Scrol -> Scroll * We need to format the string with the args ourselves (ScanError won't do it). Otherwise the args in the ScanError won't be substituted.
1 parent 3cb77ff commit e3d25e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

elasticsearch/helpers/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -275,13 +275,13 @@ def scan(client, query=None, scroll='5m', raise_on_error=True, preserve_order=Fa
275275
# check if we have any errrors
276276
if resp["_shards"]["failed"]:
277277
logger.warning(
278-
'Scrol request has failed on %d shards out of %d.',
278+
'Scroll request has failed on %d shards out of %d.',
279279
resp['_shards']['failed'], resp['_shards']['total']
280280
)
281281
if raise_on_error:
282282
raise ScanError(
283-
'Scrol request has failed on %d shards out of %d.',
284-
resp['_shards']['failed'], resp['_shards']['total']
283+
'Scroll request has failed on %d shards out of %d.' %
284+
(resp['_shards']['failed'], resp['_shards']['total'])
285285
)
286286

287287
scroll_id = resp.get('_scroll_id')

0 commit comments

Comments
 (0)