Merge branch 'master' into orm

This commit is contained in:
Emmanuel Garette 2014-01-25 10:22:17 +01:00
commit cbfb5a45b0
3 changed files with 5 additions and 5 deletions

View File

@ -352,7 +352,7 @@ class Settings(object):
raise ValueError(_('opt and all_properties must not be set ' raise ValueError(_('opt and all_properties must not be set '
'together in reset')) 'together in reset'))
if all_properties: if all_properties:
self._p_.reset_all_propertives() self._p_.reset_all_properties()
else: else:
if opt is not None and _path is None: if opt is not None and _path is None:
_path = self._get_path_by_opt(opt) _path = self._get_path_by_opt(opt)

View File

@ -31,7 +31,7 @@ class Settings(Cache):
self._permissives = {} self._permissives = {}
super(Settings, self).__init__(storage) super(Settings, self).__init__(storage)
# propertives # properties
def setproperties(self, path, properties): def setproperties(self, path, properties):
self._properties[path] = properties self._properties[path] = properties
@ -41,7 +41,7 @@ class Settings(Cache):
def hasproperties(self, path): def hasproperties(self, path):
return path in self._properties return path in self._properties
def reset_all_propertives(self): def reset_all_properties(self):
self._properties.clear() self._properties.clear()
def reset_properties(self, path): def reset_properties(self, path):

View File

@ -33,7 +33,7 @@ class Settings(Sqlite3DB):
self._storage.execute(settings_table, commit=False) self._storage.execute(settings_table, commit=False)
self._storage.execute(permissives_table) self._storage.execute(permissives_table)
# propertives # properties
def setproperties(self, path, properties): def setproperties(self, path, properties):
path = self._sqlite_encode_path(path) path = self._sqlite_encode_path(path)
self._storage.execute("DELETE FROM property WHERE path = ?", (path,), self._storage.execute("DELETE FROM property WHERE path = ?", (path,),
@ -56,7 +56,7 @@ class Settings(Sqlite3DB):
return self._storage.select("SELECT properties FROM property WHERE " return self._storage.select("SELECT properties FROM property WHERE "
"path = ?", (path,)) is not None "path = ?", (path,)) is not None
def reset_all_propertives(self): def reset_all_properties(self):
self._storage.execute("DELETE FROM property") self._storage.execute("DELETE FROM property")
def reset_properties(self, path): def reset_properties(self, path):