BaseTools/UPT:merge UPT Tool use Python2 and Python3
In UPT Tool,merge python2 and python3 Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com> Tested-by: Laszlo Ersek <lersek@redhat.com> Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com>
This commit is contained in:
@ -44,7 +44,7 @@ class IpiDatabase(object):
|
||||
Dir = os.path.dirname(DbPath)
|
||||
if not os.path.isdir(Dir):
|
||||
os.mkdir(Dir)
|
||||
self.Conn = sqlite3.connect(unicode(DbPath), isolation_level='DEFERRED')
|
||||
self.Conn = sqlite3.connect(u''.join(DbPath), isolation_level='DEFERRED')
|
||||
self.Conn.execute("PRAGMA page_size=4096")
|
||||
self.Conn.execute("PRAGMA synchronous=OFF")
|
||||
self.Cur = self.Conn.cursor()
|
||||
@ -921,7 +921,7 @@ class IpiDatabase(object):
|
||||
def __ConvertToSqlString(self, StringList):
|
||||
if self.DpTable:
|
||||
pass
|
||||
return map(lambda s: s.replace("'", "''"), StringList)
|
||||
return list(map(lambda s: s.replace("'", "''"), StringList))
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user