[Mpuls-commits] r1873 - in wasko/branches/2.0: . mpulsweb/lib
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Mar 1 13:08:07 CET 2010
Author: bh
Date: 2010-03-01 13:08:05 +0100 (Mon, 01 Mar 2010)
New Revision: 1873
Modified:
wasko/branches/2.0/ChangeLog
wasko/branches/2.0/mpulsweb/lib/config.py
Log:
* mpulsweb/lib/config.py (unmergable_dict): New. Class to use
instead of plain dict objects as default values MpulsConfig.
Instances of unmergable_dict will not be merged recursively, so
that the dict can be overwritten completely in the json file.
Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog 2010-03-01 10:05:47 UTC (rev 1872)
+++ wasko/branches/2.0/ChangeLog 2010-03-01 12:08:05 UTC (rev 1873)
@@ -1,3 +1,10 @@
+2010-03-01 Bernhard Herzog <bh at intevation.de>
+
+ * mpulsweb/lib/config.py (unmergable_dict): New. Class to use
+ instead of plain dict objects as default values MpulsConfig.
+ Instances of unmergable_dict will not be merged recursively, so
+ that the dict can be overwritten completely in the json file.
+
2010-03-01 Torsten Irländer <torsten.irlaender at intevation.de>
* jmdweb/controllers/casedocument.py: Import BaseController from
Modified: wasko/branches/2.0/mpulsweb/lib/config.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/config.py 2010-03-01 10:05:47 UTC (rev 1872)
+++ wasko/branches/2.0/mpulsweb/lib/config.py 2010-03-01 12:08:05 UTC (rev 1873)
@@ -50,6 +50,12 @@
a.update(changes)
+class unmergable_dict(dict):
+
+ """Dict-equivalent for default values that should not be merged recursively.
+ """
+
+
class MpulsConfig(object):
def __init__(self, filename=None):
More information about the Mpuls-commits
mailing list