BaseTools: remove unnecessary calls of os.exist
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2101 This patch is going to remove unnecessary calls of os.exist() Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@ -371,13 +371,12 @@ class UniFileClassObject(object):
|
||||
# Pre-process before parse .uni file
|
||||
#
|
||||
def PreProcess(self, File):
|
||||
if not os.path.exists(File.Path) or not os.path.isfile(File.Path):
|
||||
EdkLogger.error("Unicode File Parser", FILE_NOT_FOUND, ExtraData=File.Path)
|
||||
|
||||
try:
|
||||
FileIn = UniFileClassObject.OpenUniFile(LongFilePath(File.Path))
|
||||
except UnicodeError as X:
|
||||
EdkLogger.error("build", FILE_READ_FAILURE, "File read failure: %s" % str(X), ExtraData=File.Path);
|
||||
except OSError:
|
||||
EdkLogger.error("Unicode File Parser", FILE_NOT_FOUND, ExtraData=File.Path)
|
||||
except:
|
||||
EdkLogger.error("build", FILE_OPEN_FAILURE, ExtraData=File.Path);
|
||||
|
||||
|
Reference in New Issue
Block a user