SqlCommand = """drop table IF EXISTS %s""" % self.Table\r
try:\r
self.Cur.execute(SqlCommand)\r
- except sqlite3.Error, e:\r
+ except Exception, e:\r
print "An error occurred when Drop a table:", e.args[0]\r
\r
## Get count\r
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
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