From 27f38c6d6e3df494c0cf856ce87732cefe1dafdc Mon Sep 17 00:00:00 2001 From: Yonghong Zhu Date: Thu, 13 Sep 2018 14:12:00 +0800 Subject: BaseTools: remove the not used PyUtility file the PyUtility is not used, so we remove it. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/Python/Common/Misc.py | 23 +++++------------------ BaseTools/Source/Python/Common/PyUtility.pyd | Bin 6144 -> 0 bytes 2 files changed, 5 insertions(+), 18 deletions(-) delete mode 100644 BaseTools/Source/Python/Common/PyUtility.pyd (limited to 'BaseTools/Source/Python') diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index 69d306b..2ac592d 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 856b508..0000000 Binary files a/BaseTools/Source/Python/Common/PyUtility.pyd and /dev/null differ -- cgit v1.1