From 6a705d95b370b1cbd86014be4f9493ed83cc9c00 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 2 Mar 2021 10:42:39 +0100 Subject: [PATCH] dist/tools: always print how to disable programmer wrapper If the help is only printed on failure, if the script does not detect failure and programming still fails, the user has no idea how to get the full information. Always print help on how to disable this feature. --- dist/tools/programmer/programmer.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/dist/tools/programmer/programmer.py b/dist/tools/programmer/programmer.py index eddcac61d2..9b28fc62d3 100755 --- a/dist/tools/programmer/programmer.py +++ b/dist/tools/programmer/programmer.py @@ -33,6 +33,10 @@ class Programmer: def spin(self, process): """Print a spinning icon while programmer process is running.""" + print( + "For full programmer output add PROGRAMMER_QUIET=0 or " + "QUIET=0 to the make command line." + ) while process.poll() is None: for index in range(len(SPIN)): sys.stdout.write( @@ -59,11 +63,6 @@ class Programmer: # subprocess failed if process.returncode != 0: print(process.stdout.read().decode()) - else: - print( - "(for full programmer output add PROGRAMMER_QUIET=0 or " - "QUIET=0 to the make command line)" - ) def run(self): """Run the programmer in a background process."""