summaryrefslogtreecommitdiffstats
path: root/BaseTools/Source/Python/Common
diff options
context:
space:
mode:
authorYonghong Zhu <yonghong.zhu@intel.com>2018-09-13 14:12:00 +0800
committerYonghong Zhu <yonghong.zhu@intel.com>2018-10-13 10:06:12 +0800
commit27f38c6d6e3df494c0cf856ce87732cefe1dafdc (patch)
tree1b1886d71fd9442025d7990cdc29f021fc6e4229 /BaseTools/Source/Python/Common
parentb87099f336cf40c7de42d037451eca96c5bbd2b2 (diff)
downloadedk2-27f38c6d6e3df494c0cf856ce87732cefe1dafdc.tar.gz
edk2-27f38c6d6e3df494c0cf856ce87732cefe1dafdc.tar.bz2
edk2-27f38c6d6e3df494c0cf856ce87732cefe1dafdc.zip
BaseTools: remove the not used PyUtility file
the PyUtility is not used, so we remove it. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/Common')
-rw-r--r--BaseTools/Source/Python/Common/Misc.py23
-rw-r--r--BaseTools/Source/Python/Common/PyUtility.pydbin6144 -> 0 bytes
2 files changed, 5 insertions, 18 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index 69d306b939..2ac592d26b 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -477,25 +477,12 @@ def SaveFileOnChange(File, Content, IsBinaryFile=True):
EdkLogger.error(None, PERMISSION_FAILURE, "Do not have write permission on directory %s" % DirName)
try:
- if GlobalData.gIsWindows:
- try:
- from .PyUtility import SaveFileToDisk
- if not SaveFileToDisk(File, Content):
- EdkLogger.error(None, FILE_CREATE_FAILURE, ExtraData=File)
- except:
- if isinstance(Content, bytes):
- with open(File, "wb") as Fd:
- Fd.write(Content)
- else:
- with open(File, "w") as Fd:
- Fd.write(Content)
+ if isinstance(Content, bytes):
+ with open(File, "wb") as Fd:
+ Fd.write(Content)
else:
- if isinstance(Content, bytes):
- with open(File, "wb") as Fd:
- Fd.write(Content)
- else:
- with open(File, "w") as Fd:
- Fd.write(Content)
+ with open(File, "w") as Fd:
+ Fd.write(Content)
except IOError as X:
EdkLogger.error(None, FILE_CREATE_FAILURE, ExtraData='IOError %s' % X)
diff --git a/BaseTools/Source/Python/Common/PyUtility.pyd b/BaseTools/Source/Python/Common/PyUtility.pyd
deleted file mode 100644
index 856b508e4e..0000000000
--- a/BaseTools/Source/Python/Common/PyUtility.pyd
+++ /dev/null
Binary files differ