From bf448c39979fe1d9940ed408ac8cacfd9eb04bc0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 9 Nov 2020 14:05:18 +0000 Subject: [PATCH] only _AddDllDirectory existing directories (fixes OSGeo4W#649) --- python/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/utils.py b/python/utils.py index c2a403efec99..6be762ced939 100644 --- a/python/utils.py +++ b/python/utils.py @@ -780,7 +780,7 @@ def _import(name, globals={}, locals={}, fromlist=[], level=None): global _RemoveDllDirectory for p in set(new_path.split(';')) - set(old_path.split(';')): - if p is not None and p not in _import_path: + if p is not None and p not in _import_path and os.path.isdir(p): _import_paths[p] = _AddDllDirectory(p) for p in set(old_path.split(';')) - set(new_path.split(';')):