Use globals() instead of sys.modules

This commit is contained in:
Ivan Kravets committed 2022-05-18 23:14:15 +03:00
1 parent bb8b115a0b
commit 0c4c4ac657
3 files changed
+8 -9

No files matched your search

+2 -2
View File
@@ -31,11 +31,11 @@ class PlatformFactory(object):
@staticmethod
def load_platform_module(name, path):
# support for legacy dev-platforms
# backward compatibiility with the legacy dev-platforms
sys.modules["platformio.managers.platform"] = base
try:
return load_python_module("platformio.platform.%s" % name, path)
except ImportError as exc:
except ImportError:
raise UnknownPlatform(name)
@classmethod