Fix import (#9945)

pull/9955/head
William FH 1 year ago committed by GitHub
parent 8bd7a9d18e
commit fbd792ac7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -37,7 +37,7 @@ class IMessageChatLoader(chat_loaders.BaseChatLoader):
if not self.db_path.exists():
raise FileNotFoundError(f"File {self.db_path} not found")
try:
pass # type: ignore
import sqlite3 # noqa: F401
except ImportError as e:
raise ImportError(
"The sqlite3 module is required to load iMessage chats.\n"
@ -93,6 +93,7 @@ class IMessageChatLoader(chat_loaders.BaseChatLoader):
Yields:
ChatSession: Loaded chat session.
"""
import sqlite3
try:
conn = sqlite3.connect(self.db_path)

Loading…
Cancel
Save