From 4c64d72882925238c94047120314a0a3209364d0 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Tue, 3 Sep 2024 09:26:13 +0200 Subject: [PATCH] fix: "module importlib has no attribute 'machinery'" Since the merge of #190, the following errors happens: ``` ERROR: module 'importlib' has no attribute 'machinery' ERROR: Exceptions occurred during the run! ERROR: AttributeError: module 'importlib' has no attribute 'machinery' ``` This commit should fix this by importing the required package. --- offlineimap/localeval.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/offlineimap/localeval.py b/offlineimap/localeval.py index 3b137e03..286657fc 100644 --- a/offlineimap/localeval.py +++ b/offlineimap/localeval.py @@ -26,6 +26,8 @@ def __init__(self, path=None): self.namespace = {} if path is not None: + import importlib.machinery + # FIXME: limit opening files owned by current user with rights set # to fixed mode 644. importlib.machinery.SOURCE_SUFFIXES.append('') # empty string to allow any file