From d44d75798577e5b190ae6b2434b886a7fa7d1235 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 28 Jan 2016 00:37:16 +0200 Subject: [PATCH] Convert CleanPioEnvsError to warning --- platformio/commands/run.py | 7 ++++++- platformio/exception.py | 6 ------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/platformio/commands/run.py b/platformio/commands/run.py index a097ebd0..6f290ed9 100644 --- a/platformio/commands/run.py +++ b/platformio/commands/run.py @@ -57,7 +57,12 @@ def cli(ctx, environment, target, upload_port, # pylint: disable=R0913,R0914 try: _clean_pioenvs_dir(util.get_pioenvs_dir()) except Exception: - raise exception.CleanPioenvsDirError(util.get_pioenvs_dir()) + click.secho( + "Can not remove temporary directory `%s`. Please remove " + "`.pioenvs` directory from the project manually to avoid " + "build issues" % util.get_pioenvs_dir(), + fg="yellow" + ) results = [] for section in config.sections(): diff --git a/platformio/exception.py b/platformio/exception.py index ad18aefb..78059eb2 100644 --- a/platformio/exception.py +++ b/platformio/exception.py @@ -129,12 +129,6 @@ class UnknownEnvNames(PlatformioException): MESSAGE = "Unknown environment names '{0}'. Valid names are '{1}'" -class CleanPioenvsDirError(PlatformioException): - - MESSAGE = "Can not remove temporary directory `{0}`. "\ - "Please remove it manually" - - class GetSerialPortsError(PlatformioException): MESSAGE = "No implementation for your platform ('{0}') available"