[edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Improve output formatting in maintain_submodules()

Desimone, Ashley E posted 1 patch 4 years, 3 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
edkrepo/common/common_repo_functions.py | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
[edk2-devel] [edk2-staging/EdkRepo] [PATCH] EdkRepo: Improve output formatting in maintain_submodules()
Posted by Desimone, Ashley E 4 years, 3 months ago
Signed-off-by: Ashley E Desimone <ashley.e.desimone@intel.com>
---
 edkrepo/common/common_repo_functions.py | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/edkrepo/common/common_repo_functions.py b/edkrepo/common/common_repo_functions.py
index c8713dd..d857d09 100644
--- a/edkrepo/common/common_repo_functions.py
+++ b/edkrepo/common/common_repo_functions.py
@@ -201,26 +201,26 @@ def write_conditional_include(workspace_path, repo_sources, included_configs):
 def maintain_submodules(repo_sources, repo, verbose = False):
     try:
         output_data = repo.git.execute(['git', 'submodule', 'init'], with_extended_output=True, with_stdout=True)
-        if verbose:
+        if verbose and output_data[0]:
             print(output_data[0])
-        print(output_data[1])
-        if verbose:
+        if output_data[1]:
+            print(output_data[1])
+        if verbose and output_data[2]:
             print(output_data[2])
-        print()
         output_data = repo.git.execute(['git', 'submodule', 'sync', '--recursive'], with_extended_output=True, with_stdout=True)
-        if verbose:
+        if verbose and output_data[0]:
             print(output_data[0])
-        print(output_data[1])
-        if verbose:
+        if output_data[1]:
+            print(output_data[1])
+        if verbose and output_data[2]:
             print(output_data[2])
-        print()
         output_data = repo.git.execute(['git', 'submodule', 'update', '--recursive'], with_extended_output=True, with_stdout=True)
-        if verbose:
+        if verbose and output_data[0]:
             print(output_data[0])
-        print(output_data[1])
-        if verbose:
+        if output_data[1]:
+            print(output_data[1])
+        if verbose and output_data[2]:
             print(output_data[2])
-        print()
     except:
         raise EdkrepoGitException(SUBMODULE_FAILURE.format(repo_sources.remote_name))
 
-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#51710): https://edk2.groups.io/g/devel/message/51710
Mute This Topic: https://groups.io/mt/66187162/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-