File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -392,14 +392,20 @@ async def awaitIndexingEnd(self):
392392
393393 LOG .info ("Received indexing progress token" )
394394
395- last_progress = self . progress_reports [ indexing_progress ][ - 1 ]
395+ last_progress = None
396396 while not isinstance (last_progress , WorkDoneProgressEnd ):
397397 await asyncio .sleep (0.2 )
398398 if args .verbose >= 2 :
399399 LOG .debug (
400400 "Waiting for indexing end - last_progress = %s" , last_progress
401401 )
402- last_progress = self .progress_reports [indexing_progress ][- 1 ]
402+ # Initially the list of progress messages is empty, so check the length
403+ # before reading
404+ last_progress = (
405+ self .progress_reports [indexing_progress ][- 1 ]
406+ if self .progress_reports [indexing_progress ]
407+ else None
408+ )
403409
404410 LOG .info ("Received indexing end message" )
405411
You can’t perform that action at this time.
0 commit comments