Automatically accept PIO. Core 4.0 compatible dev-platforms

This commit is contained in:
Ivan Kravets
2020-08-26 06:40:22 +03:00
parent 5086b96ede
commit 0db39ccfbd

View File

@ -114,8 +114,8 @@ class PlatformBase( # pylint: disable=too-many-instance-attributes,too-many-pub
core_spec = semantic_version.SimpleSpec(self.engines["platformio"])
if self.CORE_SEMVER in core_spec:
return True
# PIO Core 4 is compatible with dev-platforms for PIO Core 2.0 & 3.0
if any(semantic_version.Version.coerce(str(v)) in core_spec for v in (2, 3)):
# PIO Core 4 is compatible with dev-platforms for PIO Core 2.0, 3.0, 4.0
if any(semantic_version.Version.coerce(str(v)) in core_spec for v in (2, 3, 4)):
return True
raise IncompatiblePlatform(self.name, str(self.CORE_SEMVER), str(core_spec))