Skip to content

Commit

Permalink
fail if output file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Oct 17, 2017
1 parent 366057b commit e387c67
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Convert_HDF5_to_AVI.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def hdf2avi(infn:Path, outfn:Path, h5key:str, cc4:str, mm=None, fps=None, ptile=

if cc4=='THEO':
assert outfn.suffix=='.ogv'


if outfn.is_file():
raise IOError(f'video output {outfn} already exists.')
# %% open HDF5 video for parameters
with h5py.File(infn,'r',libver='latest') as f:
N,y,x = f[h5key].shape[:3]
Expand Down

0 comments on commit e387c67

Please sign in to comment.