From b818b6e2aa8ac7551d075e3cfdedf835dd5ad687 Mon Sep 17 00:00:00 2001 From: Yuxin Wu Date: Sat, 3 Oct 2020 04:37:23 -0700 Subject: [PATCH] catch decryption error (#72) --- wechat/emoji.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wechat/emoji.py b/wechat/emoji.py index ba9770e..bf9be5f 100644 --- a/wechat/emoji.py +++ b/wechat/emoji.py @@ -129,8 +129,8 @@ class EmojiReader: if data_md5 == md5: return get_file_b64(fname), imghdr.what(fname) - content = self._decode_emoji(fname) try: + content = self._decode_emoji(fname) data_md5 = get_md5_hex(content) if data_md5 != md5: if content.startswith(b"wxgf"):