do not raise error if setting is not changed
This commit is contained in:
parent
f1651848d2
commit
6929d2740d
|
@ -35,6 +35,8 @@ class Setting:
|
||||||
self.dsn = 'postgres:///tiramisu?host=/var/run/postgresql/&user=tiramisu'
|
self.dsn = 'postgres:///tiramisu?host=/var/run/postgresql/&user=tiramisu'
|
||||||
|
|
||||||
def __setattr__(self, key, value):
|
def __setattr__(self, key, value):
|
||||||
|
if hasattr(self, key) and getattr(self, key) == value:
|
||||||
|
return
|
||||||
if POOL is not None: # pragma: no cover
|
if POOL is not None: # pragma: no cover
|
||||||
raise Exception(_('cannot change setting when connexion is already '
|
raise Exception(_('cannot change setting when connexion is already '
|
||||||
'opened'))
|
'opened'))
|
||||||
|
|
Loading…
Reference in New Issue