Clone of official tools

Revision:
30:f12ce67666d0
Parent:
29:1210849dba19
Child:
31:8ea194f6145b
--- a/toolchains/__init__.py	Mon Aug 29 11:18:36 2016 +0100
+++ b/toolchains/__init__.py	Mon Aug 29 11:56:59 2016 +0100
@@ -188,23 +188,6 @@
 }
 
 
-def check_toolchain_path(function):
-    """Check if the path to toolchain is valid. Exit if not.
-    Use this function as a decorator.  Causes a system exit if the path does
-    not exist. Execute the function as normal if the path does exist.
-
-    Positional arguments:
-    function -- the function to decorate
-    """
-    def perform_check(self, *args, **kwargs):
-        if not exists(self.toolchain_path) and not exists(self.toolchain_path+'.exe'):
-            error_string = 'Could not find executable for %s.\n Currently ' \
-                           'set search path: %s'% (self.name, self.toolchain_path)
-            raise Exception(error_string)
-        return function(self, *args, **kwargs)
-    return perform_check
-
-
 class mbedToolchain:
     # Verbose logging
     VERBOSE = True
@@ -719,7 +702,6 @@
 
     # THIS METHOD IS BEING CALLED BY THE MBED ONLINE BUILD SYSTEM
     # ANY CHANGE OF PARAMETERS OR RETURN VALUES WILL BREAK COMPATIBILITY
-    @check_toolchain_path
     def compile_sources(self, resources, build_path, inc_dirs=None):
         # Web IDE progress bar for project build
         files_to_compile = resources.s_sources + resources.c_sources + resources.cpp_sources
@@ -918,7 +900,6 @@
             else:
                 raise ToolException(_stderr)
 
-    @check_toolchain_path
     def build_library(self, objects, dir, name):
         needed_update = False
         lib = self.STD_LIB_NAME % name
@@ -930,7 +911,6 @@
 
         return needed_update
 
-    @check_toolchain_path
     def link_program(self, r, tmp_path, name):
         needed_update = False
         ext = 'bin'