Fix import (#9945)

This commit is contained in:
William FH 2023-08-29 12:38:42 -07:00 committed by GitHub
parent 8bd7a9d18e
commit fbd792ac7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)