summaryrefslogtreecommitdiff
path: root/BaseTools/Source/Python/Common/Misc.py
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-29 06:59:30 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-10-29 06:59:30 +0000
commit0d2711a69397d2971079121df4326d84736c181e (patch)
tree0d3c93b9db1df5a30a0d15ec9d70c75768c1f67c /BaseTools/Source/Python/Common/Misc.py
parent421fb3b504cfe18033c49a40fcd46bab45a0fb50 (diff)
downloadedk2-platforms-0d2711a69397d2971079121df4326d84736c181e.tar.xz
Sync BaseTools Trunk (version r2387) to EDKII main trunk.
Signed-off-by: lgao4 Reviewed-by: gikidy git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12602 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source/Python/Common/Misc.py')
-rw-r--r--BaseTools/Source/Python/Common/Misc.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py
index 731bbf1458..50504aa73c 100644
--- a/BaseTools/Source/Python/Common/Misc.py
+++ b/BaseTools/Source/Python/Common/Misc.py
@@ -156,7 +156,7 @@ def GuidStructureStringToGuidValueName(GuidValue):
guidValueString = GuidValue.lower().replace("{", "").replace("}", "").replace(" ", "")
guidValueList = guidValueString.split(",")
if len(guidValueList) != 11:
- EdkLogger.error(None, None, "Invalid GUID value string %s" % GuidValue)
+ EdkLogger.error(None, FORMAT_INVALID, "Invalid GUID value string [%s]" % GuidValue)
return "%08x_%04x_%04x_%02x%02x_%02x%02x%02x%02x%02x%02x" % (
int(guidValueList[0], 16),
int(guidValueList[1], 16),
@@ -1431,6 +1431,9 @@ class PathClass(object):
self._Key = self.Path.upper() # + self.ToolChainFamily + self.TagName + self.ToolCode + self.Target
return self._Key
+ def _GetTimeStamp(self):
+ return os.stat(self.Path)[8]
+
def Validate(self, Type='', CaseSensitive=True):
if GlobalData.gCaseInsensitive:
CaseSensitive = False
@@ -1465,6 +1468,7 @@ class PathClass(object):
return ErrorCode, ErrorInfo
Key = property(_GetFileKey)
+ TimeStamp = property(_GetTimeStamp)
## Parse PE image to get the required PE informaion.
#
@@ -1482,7 +1486,7 @@ class PeImageClass():
self.SectionHeaderList = []
self.ErrorInfo = ''
try:
- PeObject = open(PeFile, 'rb')
+ PeObject = open(PeFile, 'rb')
except:
self.ErrorInfo = self.FileName + ' can not be found\n'
return