From 47f36a035c723c28b63f23944298f536e56860e2 Mon Sep 17 00:00:00 2001 From: David Sangrey Date: Wed, 1 May 2024 11:08:27 -0400 Subject: [PATCH] [1462] Remove Useless Comment Add Slightly More Useful Comment --- plug.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plug.py b/plug.py index 11ed96bc..bd98f2bb 100644 --- a/plug.py +++ b/plug.py @@ -67,8 +67,8 @@ class Plugin: filename = 'plugin_' filename += name.encode(encoding='ascii', errors='replace').decode('utf-8').replace('.', '_') spec = importlib.util.spec_from_file_location(filename, loadfile) - - if spec is not None and spec.loader is not None: # Check if spec and spec.loader are not None + # Replaces older load_module() code. Includes a safety check that the module name is set. + if spec is not None and spec.loader is not None: module = importlib.util.module_from_spec(spec) sys.modules[module.__name__] = module spec.loader.exec_module(module)