From 51ff4b8e9d2d823886e406998f24ae39465905a8 Mon Sep 17 00:00:00 2001 From: Aku Kotkavuo Date: Sun, 15 Sep 2019 05:27:10 +0300 Subject: [PATCH] Better error message for unsupported compression types --- mpyq.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mpyq.py b/mpyq.py index c7a9392..53f7588 100755 --- a/mpyq.py +++ b/mpyq.py @@ -200,7 +200,8 @@ def decompress(data): elif compression_type == 16: return bz2.decompress(data[1:]) else: - raise RuntimeError("Unsupported compression type.") + msg = "Unsupported compression type: {}".format(compression_type) + raise RuntimeError(msg) hash_entry = self.get_hash_table_entry(filename) if hash_entry is None: