[libxml2/2.9] Fix build with older Python versions



commit c9f6fef20d08698950fd94f26c107ce5c10e1769
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Thu Feb 24 18:34:39 2022 +0100

    Fix build with older Python versions
    
    ModuleNotFoundError is only available since Python 3.6. Use the
    superclass ImportError instead. Fixes commit 3cc64a89.
    
    Fixes #347.

 python/setup.py.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/python/setup.py.in b/python/setup.py.in
index 4a997b4e..557e4c7d 100755
--- a/python/setup.py.in
+++ b/python/setup.py.in
@@ -6,7 +6,7 @@ import sys, os
 
 try:
     import setuptools
-except ModuleNotFoundError:
+except ImportError:
     pass
 
 from distutils.core import setup, Extension


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]