diff options
Diffstat (limited to 'bitbake/lib/bb/persist_data.py')
-rw-r--r-- | bitbake/lib/bb/persist_data.py | 13 |
1 files changed, 5 insertions, 8 deletions
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: | |||
33 | """ | 33 | """ |
34 | BitBake Persistent Data Store | 34 | BitBake Persistent Data Store |
35 | 35 | ||
36 | Used to store data in a central location such that other threads/tasks can | 36 | Used to store data in a central location such that other threads/tasks can |
37 | access them at some future date. | 37 | access them at some future date. |
38 | 38 | ||
39 | The "domain" is used as a key to isolate each data pool and in this | 39 | The "domain" is used as a key to isolate each data pool and in this |
40 | implementation corresponds to an SQL table. The SQL table consists of a | 40 | implementation corresponds to an SQL table. The SQL table consists of a |
41 | simple key and value pair. | 41 | simple key and value pair. |
42 | 42 | ||
43 | Why sqlite? It handles all the locking issues for us. | 43 | Why sqlite? It handles all the locking issues for us. |
@@ -78,7 +78,7 @@ class PersistData: | |||
78 | for row in data: | 78 | for row in data: |
79 | ret[str(row[0])] = str(row[1]) | 79 | ret[str(row[0])] = str(row[1]) |
80 | 80 | ||
81 | return ret | 81 | return ret |
82 | 82 | ||
83 | def getValue(self, domain, key): | 83 | def getValue(self, domain, key): |
84 | """ | 84 | """ |
@@ -108,7 +108,7 @@ class PersistData: | |||
108 | self._execute("DELETE from %s where key=?;" % domain, [key]) | 108 | self._execute("DELETE from %s where key=?;" % domain, [key]) |
109 | 109 | ||
110 | def _execute(self, *query): | 110 | def _execute(self, *query): |
111 | while True: | 111 | while True: |
112 | try: | 112 | try: |
113 | self.connection.execute(*query) | 113 | self.connection.execute(*query) |
114 | return | 114 | return |
@@ -116,6 +116,3 @@ class PersistData: | |||
116 | if 'database is locked' in str(e): | 116 | if 'database is locked' in str(e): |
117 | continue | 117 | continue |
118 | raise | 118 | raise |
119 | |||
120 | |||
121 | |||