Skip to content

Commit

Permalink
runalyzer-gather: check if file exists before creating tables
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener committed Jan 15, 2025
1 parent 0470b06 commit 5bfd88c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions logpyle/runalyzer_gather.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
import re
import sqlite3
from sqlite3 import Connection
Expand Down Expand Up @@ -224,6 +225,11 @@ def gather_multi_file(outfile: str, infiles: list[str], fmap: dict[str, str],
else:
feature_col_name_map[fname] = tgt_name

if os.path.exists(outfile):
print(f"Error: output file '{outfile}' already exists, exiting.")
import sys
sys.exit(1)

import sqlite3
db_conn = sqlite3.connect(outfile)
run_columns = [
Expand Down

0 comments on commit 5bfd88c

Please sign in to comment.