mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
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:
@@ -46,6 +46,9 @@ class sqlite(file):
|
|||||||
:param filepath: Path to sqlite database.
|
:param filepath: Path to sqlite database.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
if not Path(filepath).exists():
|
||||||
|
raise FileNotFoundError(f"File doesn't exist: {filepath}")
|
||||||
|
|
||||||
self.wrapped_data = None
|
self.wrapped_data = None
|
||||||
self.history_size = 64
|
self.history_size = 64
|
||||||
self.history = []
|
self.history = []
|
||||||
|
|||||||
Reference in New Issue
Block a user