cmm: limited the message locations for the new cmm parameters to those that make sense
This commit is contained in:
@@ -325,6 +325,8 @@ class ChatDB(Chat):
|
||||
when reading them.
|
||||
* 'loc': read messages from given location instead of 'db_path'
|
||||
"""
|
||||
if loc == msg_location.MEM:
|
||||
raise ChatError(f"Can't build ChatDB from message location '{loc}'")
|
||||
messages: list[Message] = []
|
||||
if loc in [msg_location.DB, msg_location.DISK, msg_location.ALL]:
|
||||
messages.extend(read_dir(db_path, glob, mfilter))
|
||||
|
||||
Reference in New Issue
Block a user