public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Zhu, Yonghong" <yonghong.zhu@intel.com>
To: "Chen, Hesheng" <hesheng.chen@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [patch] BaseTools/UPT: Fix a install issue
Date: Mon, 8 Aug 2016 09:02:28 +0000	[thread overview]
Message-ID: <B9726D6DCCFB8B4CA276A9169B02216D1136A935@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <1470626900-610212-1-git-send-email-hesheng.chen@intel.com>

Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> 

I will push this patch if no more comment from community.

Best Regards,
Zhu Yonghong


-----Original Message-----
From: Chen, Hesheng 
Sent: Monday, August 08, 2016 11:28 AM
To: edk2-devel@lists.01.org
Cc: Zhu, Yonghong <yonghong.zhu@intel.com>
Subject: [patch] BaseTools/UPT: Fix a install issue

Fix a corner case issue of installing a module without any files which causes installing UNI file failure

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: hesschen <hesheng.chen@intel.com>
---
 BaseTools/Source/Python/UPT/Library/String.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/UPT/Library/String.py b/BaseTools/Source/Python/UPT/Library/String.py
index 05b5fb1..89371db 100644
--- a/BaseTools/Source/Python/UPT/Library/String.py
+++ b/BaseTools/Source/Python/UPT/Library/String.py
@@ -962,7 +962,12 @@ def IsMatchArch(Arch1, Arch2):
 # Return the FileName with index +1 under the FilePath  #  def GetUniFileName(FilePath, FileName):
-    Files = os.listdir(FilePath)
+    Files = []
+    try:
+        Files = os.listdir(FilePath)
+    except:
+        pass
+
     LargestIndex = -1
     for File in Files:
         if File.upper().startswith(FileName.upper()) and File.upper().endswith('.UNI'):
--
2.7.2.windows.1



      reply	other threads:[~2016-08-08  9:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08  3:28 [patch] BaseTools/UPT: Fix a install issue hesschen
2016-08-08  9:02 ` Zhu, Yonghong [this message]

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=B9726D6DCCFB8B4CA276A9169B02216D1136A935@SHSMSX103.ccr.corp.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