build-system/python: Handle missing metadata on Python 2.

* gnu/packages/aux-files/python/sanity-check.py: Catch the less specific
EnvironmentError rather than FileNotFoundError as the latter is Python 3
only.
This commit is contained in:
Marius Bakke 2021-07-30 15:54:31 +02:00
parent b029be2ee0
commit f8458a2282
No known key found for this signature in database
GPG key ID: A2A06DF2A33A54FA

View file

@ -51,7 +51,7 @@ for dist in ws:
# Try to load top level modules. This should not have any side-effects.
try:
metalines = dist.get_metadata_lines('top_level.txt')
except (KeyError, FileNotFoundError):
except (KeyError, EnvironmentError):
# distutils (i.e. #:use-setuptools? #f) will not install any metadata.
# This file is also missing for packages built using a PEP 517 builder
# such as poetry.