hist_cmd: added module 'test_hist_cmd.py'
This commit is contained in:
@@ -29,7 +29,7 @@ def convert_messages(args: argparse.Namespace, config: Config) -> None:
|
||||
m.file_path = m.file_path.with_suffix('')
|
||||
chat.msg_write(msgs)
|
||||
# read all messages with the current default suffix
|
||||
msgs = chat.msg_gather(loc='disk', glob='*{msg_suffix}')
|
||||
msgs = chat.msg_gather(loc='disk', glob=f'*{msg_suffix}')
|
||||
# make sure we converted all of the original messages
|
||||
for mid in msg_ids:
|
||||
if not any(mid == m.msg_id() for m in msgs):
|
||||
@@ -41,8 +41,6 @@ def convert_messages(args: argparse.Namespace, config: Config) -> None:
|
||||
if m.file_path and m.file_path.suffix != msg_suffix:
|
||||
m.rm_file()
|
||||
print(f"Successfully converted {len(msg_ids)} messages.")
|
||||
if len(msgs):
|
||||
print(f"Deleted {len(msgs)} messages with deprecated suffixes.")
|
||||
|
||||
|
||||
def print_chat(args: argparse.Namespace, config: Config) -> None:
|
||||
|
||||
Reference in New Issue
Block a user