build/GenericProgrammer: Add check parameter to make check optional.

This commit is contained in:
Florent Kermarrec 2021-06-22 11:57:00 +02:00
parent d6f24f2f68
commit f381cdcd1a
1 changed files with 2 additions and 2 deletions

View File

@ -91,8 +91,8 @@ class GenericProgrammer:
def flash(self, address, data_file):
raise NotImplementedError
def call(self, command):
if subprocess.call(command) != 0:
def call(self, command, check=True):
if (subprocess.call(command) != 0) and check:
msg = f"Error occured during {self.__class__.__name__}'s call, please check:\n"
msg += f"- {self.__class__.__name__} installation.\n"
msg += f"- access permissions.\n"