public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Desimone, Ashley E" <ashley.e.desimone@intel.com>
To: devel@edk2.groups.io
Subject: [edk2-staging/EdkRepo] [PATCH] EdkRepo: Improve output formatting in maintain_submodules()
Date: Tue,  3 Dec 2019 17:50:31 -0800	[thread overview]
Message-ID: <20191204015031.41268-1-ashley.e.desimone@intel.com> (raw)

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


                 reply	other threads:[~2019-12-04  1:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191204015031.41268-1-ashley.e.desimone@intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox