From: Zooko O'Whielacronx Date: Fri, 28 Jan 2011 15:20:06 +0000 (-0700) Subject: setup: don't catch all Exception from check_requirement(), but only PackagingError... X-Git-Url: https://git.rkrishnan.org/webapi.txt?a=commitdiff_plain;h=b30a269ec2477e84e1b765379f9cebf0cfcb1939;p=tahoe-lafs%2Ftahoe-lafs.git setup: don't catch all Exception from check_requirement(), but only PackagingError and ImportError I noticed this because I had accidentally inserted a bug which caused AssertionError to be raised from check_requirement(). --- diff --git a/src/allmydata/__init__.py b/src/allmydata/__init__.py index 6bb20d81..c404276c 100644 --- a/src/allmydata/__init__.py +++ b/src/allmydata/__init__.py @@ -373,7 +373,7 @@ def check_all_requirements(): for requirement in install_requires: try: check_requirement(requirement, vers_and_locs) - except Exception, e: + except (ImportError, PackagingError), e: errors.append("%s: %s" % (e.__class__.__name__, e)) if errors: