Skip to content

Commit

Permalink
Ensure output_dir exists
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesaoverton committed Jan 23, 2025
1 parent 57f13da commit ca9f8d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/scripts/split-cob-edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

def initialize_tsv(output_dir, filename, fieldnames, robot_row):
'''Initialize and return a DictWriter for a ROBOT template.'''
os.makedirs(output_dir, exist_ok=True)
path = os.path.join(output_dir, filename)
path_fh = open(path, 'w')
writer = csv.DictWriter(path_fh, fieldnames, delimiter='\t', lineterminator='\n', extrasaction='ignore')
Expand Down

0 comments on commit ca9f8d7

Please sign in to comment.