From d492d9a6a8b08d4fb90a6424c8843522f33f4027 Mon Sep 17 00:00:00 2001 From: dgelessus Date: Thu, 26 Dec 2019 01:49:10 +0100 Subject: [PATCH] Remove an incorrect assertion from describe_resource red.compressed_info can be None here if decompress is False. --- README.rst | 1 + rsrcfork/__main__.py | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 720071a..e8afc04 100644 --- a/README.rst +++ b/README.rst @@ -119,6 +119,7 @@ Version 1.7.1 (next version) * Removed the old (non-subcommand-based) CLI syntax. * Added filtering support to the ``list`` subcommand. * Added a ``raw-compress-info`` subcommand to display technical header information about standalone compressed resource data. +* Fixed an incorrect ``AssertionError`` when using the ``--no-decompress`` command-line options. Version 1.7.0 ^^^^^^^^^^^^^ diff --git a/rsrcfork/__main__.py b/rsrcfork/__main__.py index a14ec9f..15ac81f 100644 --- a/rsrcfork/__main__.py +++ b/rsrcfork/__main__.py @@ -216,7 +216,6 @@ def describe_resource(res: api.Resource, *, include_type: bool, decompress: bool assert res.compressed_info is not None length_desc = f"{res.length} bytes ({res.length_raw} bytes compressed, 'dcmp' ({res.compressed_info.dcmp_id}) format)" else: - assert res.compressed_info is None length_desc = f"{res.length_raw} bytes" content_desc_parts.append(length_desc)