From 7acc132cac873e60005516272473a55a8160b9c4 Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Wed, 24 Mar 2010 16:56:12 -0700 Subject: Formatting cleanups (Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57) Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/persist_data.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'bitbake/lib/bb/persist_data.py') diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index bc4045fe85..e2bbbe54f7 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/lib/bb/persist_data.py @@ -33,11 +33,11 @@ class PersistData: """ BitBake Persistent Data Store - Used to store data in a central location such that other threads/tasks can + Used to store data in a central location such that other threads/tasks can access them at some future date. - The "domain" is used as a key to isolate each data pool and in this - implementation corresponds to an SQL table. The SQL table consists of a + The "domain" is used as a key to isolate each data pool and in this + implementation corresponds to an SQL table. The SQL table consists of a simple key and value pair. Why sqlite? It handles all the locking issues for us. @@ -78,7 +78,7 @@ class PersistData: for row in data: ret[str(row[0])] = str(row[1]) - return ret + return ret def getValue(self, domain, key): """ @@ -108,7 +108,7 @@ class PersistData: self._execute("DELETE from %s where key=?;" % domain, [key]) def _execute(self, *query): - while True: + while True: try: self.connection.execute(*query) return @@ -116,6 +116,3 @@ class PersistData: if 'database is locked' in str(e): continue raise - - - -- cgit v1.2.3-54-g00ecf