From: Frederic Massart Date: Mon, 12 May 2014 03:33:50 +0000 (+0800) Subject: Resolve plugin path before subsystem X-Git-Tag: v1.2~6 X-Git-Url: https://git.cameron1729.xyz/?a=commitdiff_plain;h=fb6473f0030dbfc66630cad19646e13b9f29f96c;p=mdk.git Resolve plugin path before subsystem --- diff --git a/lib/plugins.py b/lib/plugins.py index 77e1acc..6dbd874 100644 --- a/lib/plugins.py +++ b/lib/plugins.py @@ -210,12 +210,6 @@ class PluginManager(object): head = True tail = None while head and head != '/' and not pluginOrSubsystem: - # Check subsystems. - for k, v in cls._subSystems.iteritems(): - if v == candidate: - pluginOrSubsystem = k - break - # Check plugin types. if not pluginOrSubsystem: for k, v in cls._pluginTypesPath.iteritems(): @@ -231,6 +225,13 @@ class PluginManager(object): pluginOrSubsystem = k pluginName = tail break + + # Check subsystems. + for k, v in cls._subSystems.iteritems(): + if v == candidate: + pluginOrSubsystem = k + break + (head, tail) = os.path.split(candidate) candidate = head