From 88dffc67d9a9bede5ad8e573b4e9aa8f048ab6ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 10 Feb 2025 11:50:56 +0100 Subject: [PATCH] vmupdate: load plugins in sorted order Ensure deterministic load order, but also allow a bit of control over that order. There may be plugin that wants to be loaded before others. --- vmupdate/agent/source/plugins/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmupdate/agent/source/plugins/__init__.py b/vmupdate/agent/source/plugins/__init__.py index 5d20cf01..e254f341 100644 --- a/vmupdate/agent/source/plugins/__init__.py +++ b/vmupdate/agent/source/plugins/__init__.py @@ -1,7 +1,7 @@ import importlib import os.path import glob -modules = glob.glob(os.path.join(os.path.dirname(__file__), "*.py")) +modules = sorted(glob.glob(os.path.join(os.path.dirname(__file__), "*.py"))) __all__ = [os.path.basename(f)[:-3] for f in modules if os.path.isfile(f) and not f.endswith('__init__.py')]