public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [patch] BaseTools/UPT: Fix a install issue
@ 2016-08-08  3:28 hesschen
  2016-08-08  9:02 ` Zhu, Yonghong
  0 siblings, 1 reply; 2+ messages in thread
From: hesschen @ 2016-08-08  3:28 UTC (permalink / raw)
  To: edk2-devel

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-08  9:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-08  3:28 [patch] BaseTools/UPT: Fix a install issue hesschen
2016-08-08  9:02 ` Zhu, Yonghong

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