diff options
Diffstat (limited to 'bitbake/lib/prserv/db.py')
-rw-r--r-- | bitbake/lib/prserv/db.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/bitbake/lib/prserv/db.py b/bitbake/lib/prserv/db.py index b4bda7078c..0859cf4f2c 100644 --- a/bitbake/lib/prserv/db.py +++ b/bitbake/lib/prserv/db.py | |||
@@ -64,7 +64,7 @@ class PRTable(object): | |||
64 | try: | 64 | try: |
65 | return self.conn.execute(*query) | 65 | return self.conn.execute(*query) |
66 | except sqlite3.OperationalError as exc: | 66 | except sqlite3.OperationalError as exc: |
67 | if 'is locked' in str(exc) and end > time.time(): | 67 | if "is locked" in str(exc) and end > time.time(): |
68 | continue | 68 | continue |
69 | raise exc | 69 | raise exc |
70 | 70 | ||
@@ -220,18 +220,18 @@ class PRTable(object): | |||
220 | metainfo = {} | 220 | metainfo = {} |
221 | #column info | 221 | #column info |
222 | if colinfo: | 222 | if colinfo: |
223 | metainfo['tbl_name'] = self.table | 223 | metainfo["tbl_name"] = self.table |
224 | metainfo['core_ver'] = prserv.__version__ | 224 | metainfo["core_ver"] = prserv.__version__ |
225 | metainfo['col_info'] = [] | 225 | metainfo["col_info"] = [] |
226 | data = self._execute("PRAGMA table_info(%s);" % self.table) | 226 | data = self._execute("PRAGMA table_info(%s);" % self.table) |
227 | for row in data: | 227 | for row in data: |
228 | col = {} | 228 | col = {} |
229 | col['name'] = row['name'] | 229 | col["name"] = row["name"] |
230 | col['type'] = row['type'] | 230 | col["type"] = row["type"] |
231 | col['notnull'] = row['notnull'] | 231 | col["notnull"] = row["notnull"] |
232 | col['dflt_value'] = row['dflt_value'] | 232 | col["dflt_value"] = row["dflt_value"] |
233 | col['pk'] = row['pk'] | 233 | col["pk"] = row["pk"] |
234 | metainfo['col_info'].append(col) | 234 | metainfo["col_info"].append(col) |
235 | 235 | ||
236 | #data info | 236 | #data info |
237 | datainfo = [] | 237 | datainfo = [] |
@@ -261,12 +261,12 @@ class PRTable(object): | |||
261 | else: | 261 | else: |
262 | data = self._execute(sqlstmt) | 262 | data = self._execute(sqlstmt) |
263 | for row in data: | 263 | for row in data: |
264 | if row['version']: | 264 | if row["version"]: |
265 | col = {} | 265 | col = {} |
266 | col['version'] = row['version'] | 266 | col["version"] = row["version"] |
267 | col['pkgarch'] = row['pkgarch'] | 267 | col["pkgarch"] = row["pkgarch"] |
268 | col['checksum'] = row['checksum'] | 268 | col["checksum"] = row["checksum"] |
269 | col['value'] = row['value'] | 269 | col["value"] = row["value"] |
270 | datainfo.append(col) | 270 | datainfo.append(col) |
271 | return (metainfo, datainfo) | 271 | return (metainfo, datainfo) |
272 | 272 | ||
@@ -275,7 +275,7 @@ class PRTable(object): | |||
275 | for line in self.conn.iterdump(): | 275 | for line in self.conn.iterdump(): |
276 | writeCount = writeCount + len(line) + 1 | 276 | writeCount = writeCount + len(line) + 1 |
277 | fd.write(line) | 277 | fd.write(line) |
278 | fd.write('\n') | 278 | fd.write("\n") |
279 | return writeCount | 279 | return writeCount |
280 | 280 | ||
281 | class PRData(object): | 281 | class PRData(object): |