public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-staging/EdkRepo] [PATCH] EdkRepo: Improve output formatting in maintain_submodules()
@ 2019-12-04  1:50 Desimone, Ashley E
  0 siblings, 0 replies; only message in thread
From: Desimone, Ashley E @ 2019-12-04  1:50 UTC (permalink / raw)
  To: devel

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-04  1:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-04  1:50 [edk2-staging/EdkRepo] [PATCH] EdkRepo: Improve output formatting in maintain_submodules() Desimone, Ashley E

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox