File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -1149,12 +1149,18 @@ def error(self, msg):
11491149 # Remove temp video and audio files
11501150 if do_merge and not (options .get ('keep_ts_files' ) or options .get ('keep_temp_files' )):
11511151 if file_names ["streams" ][manifest ].get ('video' ):
1152- self .logger .info ("Removing {0}" .format (file_names ["streams" ][manifest ].get ('video' ).absolute ()))
1153- file_names ["streams" ][manifest ].get ('video' ).unlink (missing_ok = True )
1152+ try :
1153+ self .logger .info ("Removing {0}" .format (file_names ["streams" ][manifest ].get ('video' ).absolute ()))
1154+ file_names ["streams" ][manifest ].get ('video' ).unlink (missing_ok = True )
1155+ except Exception as e :
1156+ self .logger .exception ("Unable to remove video .ts file" )
11541157 file_names ["streams" ][manifest ].pop ('video' ,None )
11551158 if file_names ["streams" ][manifest ].get ('audio' ):
1156- self .logger .info ("Removing {0}" .format (file_names ["streams" ][manifest ].get ('audio' ).absolute ()))
1157- file_names ["streams" ][manifest ].get ('audio' ).unlink (missing_ok = True )
1159+ try :
1160+ self .logger .info ("Removing {0}" .format (file_names ["streams" ][manifest ].get ('audio' ).absolute ()))
1161+ file_names ["streams" ][manifest ].get ('audio' ).unlink (missing_ok = True )
1162+ except Exception as e :
1163+ self .logger .exception ("Unable to remove video .ts file" )
11581164 file_names ["streams" ][manifest ].pop ('audio' ,None )
11591165 del ydl
11601166 return file_names
You can’t perform that action at this time.
0 commit comments