Use list.extend instead of inserting one by one
This commit is contained in:
parent
665878fd72
commit
8102d3faaf
1 changed files with 1 additions and 2 deletions
|
@ -489,8 +489,7 @@ def ReadComments(input_files, font_size=25.0, progress_callback=None):
|
||||||
CommentProcessor = GetCommentProcessor(f)
|
CommentProcessor = GetCommentProcessor(f)
|
||||||
if not CommentProcessor:
|
if not CommentProcessor:
|
||||||
raise ValueError(_('Unknown comment file format: %s') % i)
|
raise ValueError(_('Unknown comment file format: %s') % i)
|
||||||
for comment in CommentProcessor(FilterBadChars(f), font_size):
|
comments.extend(CommentProcessor(FilterBadChars(f), font_size))
|
||||||
comments.append(comment)
|
|
||||||
if progress_callback:
|
if progress_callback:
|
||||||
progress_callback(len(input_files), len(input_files))
|
progress_callback(len(input_files), len(input_files))
|
||||||
comments.sort()
|
comments.sort()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue