From 2b88ef134b47a136a064992baad4d9f6176b4ba4 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 18 Jun 2016 00:56:04 +0300 Subject: [PATCH] Remove duplicated flags // Issue #698 --- platformio/__init__.py | 2 +- platformio/builder/tools/platformio.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index b2567541..818bf941 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (2, 10, "4.dev1") +VERSION = (2, 10, "4.dev2") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 41341b96..22e7dc94 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -159,9 +159,9 @@ def ProcessUnFlags(env, flags): for key in parsed_flags.keys(): cur_flags = set(env.get(key, [])) - common = cur_flags & all_flags - for item in common: - env[key].remove(item) + for item in (cur_flags & all_flags): + while item in env[key]: + env[key].remove(item) def IsFileWithExt(env, file_, ext): # pylint: disable=W0613