ifcopenshell.sql - handle non existing files

previously it would create an empty database and give a confusing error "AssertionError: SQLite schema not supported."
This commit is contained in:
Andrej730
2024-09-24 12:19:53 +05:00
parent 9e86d83616
commit 46cc3a449a
@@ -46,6 +46,9 @@ class sqlite(file):
:param filepath: Path to sqlite database.
"""
if not Path(filepath).exists():
raise FileNotFoundError(f"File doesn't exist: {filepath}")
self.wrapped_data = None
self.history_size = 64
self.history = []