aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2022-09-17 18:01:24 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2022-09-17 18:51:51 +0200
commitecafb3bfccc37a56f718b89c8820cbf09015a48d (patch)
tree12370265fdec7bd2e487b97714c8b6d17e4348fe /wee_slack.py
parenta68ccea21d8ab607916cf3d63f32e3fd34d2fecb (diff)
downloadwee-slack-ecafb3bfccc37a56f718b89c8820cbf09015a48d.tar.gz
Don't crash on missing mode on files in messages
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 14feb38..a9cd888 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -4686,7 +4686,7 @@ def unwrap_files(message_json, text_before):
):
text = "{} ({})".format(f["url_private"], f["title"])
else:
- dbg("File {} has unrecognized mode {}".format(f["id"], f["mode"]), 5)
+ dbg("File {} has unrecognized mode {}".format(f["id"], f.get("mode")), 5)
text = colorize_string(
config.color_deleted, "(This file cannot be handled.)"
)