summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
diff options
context:
space:
mode:
authorFeng, Bob C <bob.c.feng@intel.com>2019-09-04 13:00:37 +0800
committerFeng, Bob C <bob.c.feng@intel.com>2019-09-17 10:19:05 +0800
commit0075ab2cec500fc679c6b2e4990142b4a2e51050 (patch)
treedd5fe19ef82620090e1733e9f7e3322bdf9e1f15 /BaseTools/Source/Python/AutoGen/AutoGenWorker.py
parentbc9e4194cf3edaf9524c83098ba3f72008c70190 (diff)
downloadedk2-0075ab2cec500fc679c6b2e4990142b4a2e51050.tar.gz
edk2-0075ab2cec500fc679c6b2e4990142b4a2e51050.tar.bz2
edk2-0075ab2cec500fc679c6b2e4990142b4a2e51050.zip
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>
Diffstat (limited to 'BaseTools/Source/Python/AutoGen/AutoGenWorker.py')
-rwxr-xr-xBaseTools/Source/Python/AutoGen/AutoGenWorker.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
index 77fbd8b369..94ea61a487 100755
--- a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py
@@ -155,10 +155,11 @@ class AutoGenWorkerInProcess(mp.Process):
try:
taskname = "Init"
with self.file_lock:
- if not os.path.exists(self.data_pipe_file_path):
+ try:
+ self.data_pipe = MemoryDataPipe()
+ self.data_pipe.load(self.data_pipe_file_path)
+ except:
self.feedback_q.put(taskname + ":" + "load data pipe %s failed." % self.data_pipe_file_path)
- self.data_pipe = MemoryDataPipe()
- self.data_pipe.load(self.data_pipe_file_path)
EdkLogger.LogClientInitialize(self.log_q)
loglevel = self.data_pipe.Get("LogLevel")
if not loglevel: