Not closing file if passing in a file instead of a filename

This commit is contained in:
Star Brilliant 2014-04-06 23:01:02 +08:00
parent f6a7601fd7
commit 0a6a50b7aa

View File

@ -697,7 +697,7 @@ def Danmaku2ASS(input_files, output_file, stage_width, stage_height, reserve_bla
fo = sys.stdout
ProcessComments(comments, fo, stage_width, stage_height, reserve_blank, font_face, font_size, text_opacity, comment_duration, is_reduce_comments, progress_callback)
finally:
if output_file and fo:
if output_file and fo != output_file:
fo.close()