From d32dc623bb2b6e229ae2a539b66bab04699d78a8 Mon Sep 17 00:00:00 2001 From: Markus Keil Date: Wed, 17 Jan 2024 17:37:59 +0100 Subject: [PATCH] make manifest seal more resiliant --- main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.py b/main.py index c7e8e3b..f89b867 100644 --- a/main.py +++ b/main.py @@ -241,6 +241,10 @@ def seal_manifest(guild_id, channel_id): seal_path = manifest_path.replace('.manifest','.seal') # load the manifest contents + if not os.path.exists(manifest_path): + print(f'No manifest for {guild_id} - {channel_id}. Likly empty channel. Skipping seal.') + return + with open(manifest_path, 'r', encoding='utf-8') as manifest: man_str = manifest.read() _, manifest_hash = hash_string(man_str)