Replace Python 'import importlib' with 'import importlib.machinery'

Fix-up for recent commit f0582fdbf1
"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 <module>
        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'.
This commit is contained in:
Thomas Schwinge 2021-12-21 15:04:32 +01:00 committed by Dodji Seketeli
parent 968fe8c013
commit cc1f38ffed

View File

@ -39,7 +39,7 @@ variables.
import os
import tempfile
import importlib
import importlib.machinery
import six
try: