From 3c77dce935e50ff11489437746f66ef8d3ffebb8 Mon Sep 17 00:00:00 2001 From: Nikhil Parasaram Date: Mon, 28 Feb 2022 16:14:19 +0000 Subject: [PATCH] Fix issues with sqlite3 (#1594) * Mythril v0.22.14 * Add trace plugin and find trace * Add finding trace * Add some changes * change help text * Add some comments * Add support for concolic strategy * Fix issues * Add concolic exec tool * Add a few fixes * Fix a few errors * Add tests * Fix test interface * Add muti flip test * Add multi contract test * Fix cases with multicontract calls * Add more tests and fixes * Fix tests * Fix mypy * Change tests and other small fixes * Add more documentation * Add some changes * Update mythril/concolic/find_trace.py Co-authored-by: JoranHonig * Remove space Co-authored-by: JoranHonig * Fix typing * Fix Review issues * Change test type * Remove deepcopy * Use 3.8 for typing * Use typing_extensions * Fix prev_state * Add changes to tests and fix some bugs * Fix address assignment * Fix issues and format * Remove set_option * Split plugins * Refactor * Handle sqlite3 Co-authored-by: JoranHonig --- mythril/support/signatures.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mythril/support/signatures.py b/mythril/support/signatures.py index 1b9475e1..c6cded33 100644 --- a/mythril/support/signatures.py +++ b/mythril/support/signatures.py @@ -93,7 +93,10 @@ class SQLiteDB(object): :return: """ - self.conn = sqlite3.connect(self.path) + try: + self.conn = sqlite3.connect(self.path) + except sqlite3.OperationalError as e: + raise sqlite3.OperationalError(f"Unable to Connect to path {self.path}") self.cursor = self.conn.cursor() return self.cursor