From f381cdcd1af39fd89d39d8f017d5205c54fa00be Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Tue, 22 Jun 2021 11:57:00 +0200 Subject: [PATCH] build/GenericProgrammer: Add check parameter to make check optional. --- litex/build/generic_programmer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litex/build/generic_programmer.py b/litex/build/generic_programmer.py index 814f5da62..bcee61006 100644 --- a/litex/build/generic_programmer.py +++ b/litex/build/generic_programmer.py @@ -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"