From 6b63ae2e46eb1a8a4d55fa7bf586a140ddb54adb Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Thu, 1 Sep 2016 21:56:43 +0300 Subject: [PATCH] Ignore warning when can't delete temporary file --- platformio/builder/tools/piomisc.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/platformio/builder/tools/piomisc.py b/platformio/builder/tools/piomisc.py index 1a6d83c9..94bf6e81 100644 --- a/platformio/builder/tools/piomisc.py +++ b/platformio/builder/tools/piomisc.py @@ -81,7 +81,6 @@ class InoToCPPConverter(object): tmp_path = mkstemp()[1] with open(tmp_path, "w") as fp: fp.write(contents) - fp.close() self.env.Execute( self.env.VerboseAction( '$CXX -o "{0}" -x c++ -fpreprocessed -dD -E "{1}"'.format( @@ -185,9 +184,7 @@ def _delete_file(path): if isfile(path): remove(path) except: # pylint: disable=bare-except - if path and isfile(path): - sys.stderr.write("Warning: Could not remove temporary file '%s'. " - "Please remove it manually.\n" % path) + pass def DumpIDEData(env):