diff options
Diffstat (limited to 'bitbake/lib/bb/persist_data.py')
-rw-r--r-- | bitbake/lib/bb/persist_data.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index e45042324e..403f3a541e 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/lib/bb/persist_data.py | |||
@@ -92,9 +92,9 @@ class SQLTable(collections.MutableMapping): | |||
92 | self._execute("DELETE from %s where key=?;" % self.table, [key]) | 92 | self._execute("DELETE from %s where key=?;" % self.table, [key]) |
93 | 93 | ||
94 | def __setitem__(self, key, value): | 94 | def __setitem__(self, key, value): |
95 | if not isinstance(key, basestring): | 95 | if not isinstance(key, str): |
96 | raise TypeError('Only string keys are supported') | 96 | raise TypeError('Only string keys are supported') |
97 | elif not isinstance(value, basestring): | 97 | elif not isinstance(value, str): |
98 | raise TypeError('Only string values are supported') | 98 | raise TypeError('Only string values are supported') |
99 | 99 | ||
100 | data = self._execute("SELECT * from %s where key=?;" % | 100 | data = self._execute("SELECT * from %s where key=?;" % |
@@ -131,14 +131,14 @@ class SQLTable(collections.MutableMapping): | |||
131 | return [row[1] for row in data] | 131 | return [row[1] for row in data] |
132 | 132 | ||
133 | def values(self): | 133 | def values(self): |
134 | return list(self.itervalues()) | 134 | return list(self.values()) |
135 | 135 | ||
136 | def itervalues(self): | 136 | def itervalues(self): |
137 | data = self._execute("SELECT value FROM %s;" % self.table) | 137 | data = self._execute("SELECT value FROM %s;" % self.table) |
138 | return (row[0] for row in data) | 138 | return (row[0] for row in data) |
139 | 139 | ||
140 | def items(self): | 140 | def items(self): |
141 | return list(self.iteritems()) | 141 | return list(self.items()) |
142 | 142 | ||
143 | def iteritems(self): | 143 | def iteritems(self): |
144 | return self._execute("SELECT * FROM %s;" % self.table) | 144 | return self._execute("SELECT * FROM %s;" % self.table) |
@@ -178,7 +178,7 @@ class PersistData(object): | |||
178 | """ | 178 | """ |
179 | Return a list of key + value pairs for a domain | 179 | Return a list of key + value pairs for a domain |
180 | """ | 180 | """ |
181 | return self.data[domain].items() | 181 | return list(self.data[domain].items()) |
182 | 182 | ||
183 | def getValue(self, domain, key): | 183 | def getValue(self, domain, key): |
184 | """ | 184 | """ |