Преглед на файлове

main: When retrying the connection, show the attempt number

The current bitbake output makes it hard to know which retry is being
attempted. Add this information to the output to make it clearer.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Richard Purdie преди 5 години
родител
ревизия
0774e6e03d
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3 2
      lib/bb/main.py

+ 3 - 2
lib/bb/main.py

@@ -475,10 +475,11 @@ def setup_bitbake(configParams, configuration, extrafeatures=None):
                 if not retries:
                     raise
                 retries -= 1
+                tryno = 8 - retries
                 if isinstance(e, (bb.server.process.ProcessTimeout, BrokenPipeError)):
-                    logger.info("Retrying server connection...")
+                    logger.info("Retrying server connection (#%d)..." % tryno)
                 else:
-                    logger.info("Retrying server connection... (%s)" % traceback.format_exc())
+                    logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc()))
             if not retries:
                 bb.fatal("Unable to connect to bitbake server, or start one")
             if retries < 5: