Remove an incorrect assertion from describe_resource

red.compressed_info can be None here if decompress is False.
This commit is contained in:
dgelessus 2019-12-26 01:49:10 +01:00
parent d0e1eaf262
commit d492d9a6a8
2 changed files with 1 additions and 1 deletions

View File

@ -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
^^^^^^^^^^^^^

View File

@ -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)