[New-bugs-announce] [issue41725] bz2 would use a dedicated exception for data error
Michał Górny
report at bugs.python.org
Sat Sep 5 06:26:14 EDT 2020
New submission from Michał Górny <mgorny at gentoo.org>:
Currently, the bz2 extension functions raise a generic OSError() on BZ_DATA_ERROR and BZ_DATA_ERROR_MAGIC. When working on files, this makes it unnecessarily hard to catch compressor errors (i.e. invalid bz2 input file) without catching system I/O errors. Could you please consider adding a new exception type for bz2 errors, akin to gzip.BadGzipFile?
----------
components: Extension Modules
messages: 376427
nosy: mgorny
priority: normal
severity: normal
status: open
title: bz2 would use a dedicated exception for data error
type: enhancement
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41725>
_______________________________________
More information about the New-bugs-announce
mailing list