Skip to content

Commit

Permalink
Fix list_to_googletrans index error bug
Browse files Browse the repository at this point in the history
  • Loading branch information
BingLingGroup committed Jul 31, 2019
1 parent 8a60f05 commit 1d5cdb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autosub/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def list_to_googletrans( # pylint: disable=too-many-locals, too-many-arguments
result_list = result_text.split('\n')

while i < index:
if i == valid_index[j]:
if j < len(valid_index) and i == valid_index[j]:
# if text is the valid one, append it
translated_text.append(
result_list[valid_index[j] - last_index])
Expand Down

0 comments on commit 1d5cdb0

Please sign in to comment.