Skip to content

Commit

Permalink
missing_ok arg only available in python 3.8+
Browse files Browse the repository at this point in the history
  • Loading branch information
Thinh Nguyen committed Sep 2, 2022
1 parent fbdbe24 commit 35da39b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions element_array_ephys/readers/kilosort_triggering.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,15 @@ def generate_CatGT_input_json(self):
/ f'{session_str}_g{gate_str}_imec{probe_str}'
/ f'{session_str}_g{gate_str}_t{trig_str}.imec{probe_str}.ap.bin')
continuous_file_symlink.parent.mkdir(parents=True, exist_ok=True)
continuous_file_symlink.unlink(missing_ok=True)
if continuous_file_symlink.exists():
continuous_file_symlink.unlink()
continuous_file_symlink.symlink_to(continuous_file)
input_meta_fullpath_symlink = (input_meta_fullpath.parent / f'{session_str}_g{gate_str}'
/ f'{session_str}_g{gate_str}_imec{probe_str}'
/ f'{session_str}_g{gate_str}_t{trig_str}.imec{probe_str}.ap.meta')
input_meta_fullpath_symlink.parent.mkdir(parents=True, exist_ok=True)
input_meta_fullpath_symlink.unlink(missing_ok=True)
if input_meta_fullpath_symlink.exists():
input_meta_fullpath_symlink.unlink()
input_meta_fullpath_symlink.symlink_to(input_meta_fullpath)

createInputJson(self._catGT_input_json.as_posix(),
Expand Down

0 comments on commit 35da39b

Please sign in to comment.