From cc1f38ffedb8d456d43fb52c369409037c5ca4a9 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Tue, 21 Dec 2021 15:04:32 +0100 Subject: [PATCH] Replace Python 'import importlib' with 'import importlib.machinery' Fix-up for recent commit f0582fdbf1267f0f34bf3c3b6698b60026410146 "Replace use of deprecated Python 'imp' module with 'importlib'", which... [...] seems to have broken something on centos7 x86_64: https://builder.wildebeest.org/buildbot/#/changes/7273 File "/srv/buildbot/worker/libabigail-centos-x86_64/build/tests/mockfedabipkgdiff", line 73, in fedabipkgdiff_mod = importlib.machinery.SourceFileLoader('fedabipkgdiff', FEDABIPKGDIFF).load_module() AttributeError: 'module' object has no attribute 'machinery' Again, I've asked The Internet what to do about that, and this commit is the result. But beware: I'm still not a Python wizard. * tests/mockfedabipkgdiff.in: Replace Python 'import importlib' with 'import importlib.machinery'. --- tests/mockfedabipkgdiff.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mockfedabipkgdiff.in b/tests/mockfedabipkgdiff.in index 7de42b86..29a28ad9 100644 --- a/tests/mockfedabipkgdiff.in +++ b/tests/mockfedabipkgdiff.in @@ -39,7 +39,7 @@ variables. import os import tempfile -import importlib +import importlib.machinery import six try: