From f8458a228224942298e0967a099f872c13713ede Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 30 Jul 2021 15:54:31 +0200 Subject: 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. --- gnu/packages/aux-files/python/sanity-check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/aux-files') diff --git a/gnu/packages/aux-files/python/sanity-check.py b/gnu/packages/aux-files/python/sanity-check.py index 83b6d583ca..a84f8f03c0 100644 --- a/gnu/packages/aux-files/python/sanity-check.py +++ b/gnu/packages/aux-files/python/sanity-check.py @@ -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. -- cgit v1.2.3