File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -408,6 +408,10 @@ def main(argv=sys.argv[1:]):
408408 input1 = args .input / input1
409409 input1 = os .path .expanduser (input1 )
410410 all_inputs .add (input1 )
411+ if not os .path .exists (input1 ):
412+ print (f"ERROR: input not found: { input1 } " , file = sys .stderr )
413+ sys .exit (1 )
414+
411415
412416 segment_list .append ([segment_number , seconds (start ), cumulative_time ])
413417 segment_list .append ([segment_number , seconds (stop ), None ])
@@ -452,6 +456,9 @@ def main(argv=sys.argv[1:]):
452456 # Subtitles?
453457 if args .srt :
454458 sub_file = os .path .splitext (input1 )[0 ] + '.srt'
459+ if not os .path .exists (sub_file ):
460+ print (f'ERROR: subtitle file not found: { sub_file } ' , file = sys .stderr )
461+ sys .exit (1 )
455462 start_dt = timedelta (seconds = seconds (start ))
456463 end_dt = timedelta (seconds = seconds (stop ))
457464 start_cumulative_dt = timedelta (seconds = start_cumulative )
You can’t perform that action at this time.
0 commit comments