Fix issue with "IOError" in VSCode when processing a project

This commit is contained in:
Ivan Kravets
2017-09-02 15:39:32 +03:00
parent ccd650dda0
commit 9b66abf5ef
2 changed files with 6 additions and 1 deletions

View File

@ -10,6 +10,7 @@ PlatformIO 3.0
* PIO Home
* Fixed "Super-Quick (Mac / Linux)" installer script
(`issue #1017 <https://github.com/platformio/platformio-core/issues/1017>`_)
* Fixed issue with "IOError" in VSCode when processing a project
3.4.1 (2017-08-02)
~~~~~~~~~~~~~~~~~~

View File

@ -15,6 +15,7 @@
import base64
import os
import re
import sys
from imp import load_source
from multiprocessing import cpu_count
from os.path import basename, dirname, isdir, isfile, join
@ -394,7 +395,10 @@ class PlatformRunMixin(object):
fg = (None, "yellow", "red")[level - 1]
if level == 1 and "is up to date" in line:
fg = "green"
click.secho(line, fg=fg, err=level > 1)
try:
click.secho(line, fg=fg, err=level > 1)
except IOError:
(sys.stderr.write if level > 1 else sys.stdout.write)(line + "\n")
@staticmethod
def get_job_nums():