[issue11501] distutils.archive_util should handle absence of zlib module

Éric Araujo report at bugs.python.org
Mon Mar 14 21:55:52 CET 2011


Éric Araujo <merwok at netwok.org> added the comment:

Thanks.  One question: why not using a clause like “if zlib is not None” instead of catching a RuntimeError?  The if test looks more specific to me, whereas the RuntimeError might come from something else, and thus shouldn’t always e ignored.

In the patch function, I would not use assert but hasattr and a real exception (so that the behavior does not change when run under python -O).

----------
versions: +Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11501>
_______________________________________


More information about the Python-bugs-list mailing list