]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/Workspace/MetaDataTable.py
BaseTools: use set instead of list for a variable to be used with in
[mirror_edk2.git] / BaseTools / Source / Python / Workspace / MetaDataTable.py
index 34ef4903df16625d49178a2e11fd52c883e87384..0cfec902326186dbda52d23281de47387f9d4a07 100644 (file)
@@ -1,7 +1,7 @@
 ## @file\r
 # This file is used to create/update/query/erase table for files\r
 #\r
-# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -14,7 +14,7 @@
 ##\r
 # Import Modules\r
 #\r
-import os\r
+import Common.LongFilePathOs as os\r
 \r
 import Common.EdkLogger as EdkLogger\r
 from CommonDataClass import DataClass\r
@@ -113,7 +113,7 @@ class Table(object):
         SqlCommand = """select max(ID) from %s""" % self.Table\r
         Record = self.Cur.execute(SqlCommand).fetchall()\r
         Id = Record[0][0]\r
-        if Id == None:\r
+        if Id is None:\r
             Id = self.IdBase\r
         return Id\r
 \r
@@ -311,7 +311,7 @@ class TableDataModel(Table):
     def InitTable(self):\r
         EdkLogger.verbose("\nInitialize table DataModel started ...")\r
         Count = self.GetCount()\r
-        if Count != None and Count != 0:\r
+        if Count is not None and Count != 0:\r
             return\r
         for Item in DataClass.MODEL_LIST:\r
             CrossIndex = Item[1]\r