From 6974c784cbfcdf61725f4f28ecca34991774369f 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. (re-add this patch since it be reverted in Python3 migration patches, but this check is not related with Python3) 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 | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'BaseTools/Source/Python/Common/Misc.py') diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index 0efd8b05a8..6abbb9a944 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -475,19 +475,9 @@ 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: - Fd = open(File, "wb") - Fd.write(Content) - Fd.close() - else: - Fd = open(File, "wb") - Fd.write(Content) - Fd.close() + Fd = open(File, "wb") + Fd.write(Content) + Fd.close() except IOError as X: EdkLogger.error(None, FILE_CREATE_FAILURE, ExtraData='IOError %s' % X) -- cgit v1.2.3