From 1b2467c58f3fd4b407c676438bf471afd65588aa Mon Sep 17 00:00:00 2001 From: Hess Chen Date: Thu, 25 Jun 2015 07:50:55 +0000 Subject: BaseTools/Ecc: Add a checkpoint for invalid UNI file. Add a checkpoint to check that the UNI file which is associated by INF or DEC file need define the prompt and help information. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hess Chen Reviewed-by: YangX Li git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17706 6f19259b-4bc3-4df7-8a09-765794883524 --- BaseTools/Source/Python/Common/LongFilePathSupport.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'BaseTools/Source/Python/Common/LongFilePathSupport.py') diff --git a/BaseTools/Source/Python/Common/LongFilePathSupport.py b/BaseTools/Source/Python/Common/LongFilePathSupport.py index 72dde20503..b3e3c8ea64 100644 --- a/BaseTools/Source/Python/Common/LongFilePathSupport.py +++ b/BaseTools/Source/Python/Common/LongFilePathSupport.py @@ -1,7 +1,7 @@ ## @file # Override built in function file.open to provide support for long file path # -# Copyright (c) 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -14,6 +14,7 @@ import os import platform import shutil +import codecs ## # OpenLongPath @@ -37,6 +38,9 @@ def LongFilePath(FileName): def OpenLongFilePath(FileName, Mode='r', Buffer= -1): return open(LongFilePath(FileName), Mode, Buffer) +def CodecOpenLongFilePath(Filename, Mode='rb', Encoding=None, Errors='strict', Buffering=1): + return codecs.open(LongFilePath(Filename), Mode, Encoding, Errors, Buffering) + ## # CopyLongFilePath # wrap copyfile to support copy a long file path -- cgit v1.2.3