New submission from Michał Górny <mgo...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue41725>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to