diff --git a/buildroot/share/PlatformIO/scripts/pioutil.py b/buildroot/share/PlatformIO/scripts/pioutil.py index cc3db33df4..18e6dba928 100644 --- a/buildroot/share/PlatformIO/scripts/pioutil.py +++ b/buildroot/share/PlatformIO/scripts/pioutil.py @@ -6,7 +6,8 @@ def is_pio_build(): from SCons.Script import DefaultEnvironment env = DefaultEnvironment() - return not env.IsIntegrationDump() and not env.IsCleanTarget() + if "IsCleanTarget" in dir(env) and env.IsCleanTarget(): return False + return not env.IsIntegrationDump() def get_pio_version(): from platformio import util