Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-sdk-tools by
Diff: toolchains/__init__.py
- Revision:
- 30:f12ce67666d0
- Parent:
- 29:1210849dba19
- Child:
- 31:182518299918
diff -r 1210849dba19 -r f12ce67666d0 toolchains/__init__.py --- 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'