Skip to content

Commit

Permalink
Correct: sqlite3.Warning: You can only execute one statement at a time.
Browse files Browse the repository at this point in the history
  • Loading branch information
blackandred committed Feb 18, 2020
1 parent f215ea2 commit 2738f3e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions infracheck/infracheck/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ def _connect_to_db(self, db_path: str):
data TEXT,
date_added TEXT
);
CREATE INDEX check_name_index ON checks_cache(check_name);
'''
)

self.db.execute('CREATE INDEX check_name_index ON checks_cache(check_name);')

except sqlite3.OperationalError:
pass

Expand Down

0 comments on commit 2738f3e

Please sign in to comment.