[Mpuls-commits] r2661 - in wasko/branches/2.0: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed May 5 16:11:43 CEST 2010


Author: bh
Date: 2010-05-05 16:11:43 +0200 (Wed, 05 May 2010)
New Revision: 2661

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/mpulsweb/lib/config.py
Log:
* mpulsweb/lib/config.py (MpulsConfig.build_defaults)
(MpulsAppConfig.build_defaults, MpulsDBMapping.build_defaults):
Update doc-strings.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-05-05 14:04:48 UTC (rev 2660)
+++ wasko/branches/2.0/ChangeLog	2010-05-05 14:11:43 UTC (rev 2661)
@@ -1,5 +1,11 @@
 2010-05-05  Bernhard Herzog  <bh at intevation.de>
 
+	* mpulsweb/lib/config.py (MpulsConfig.build_defaults)
+	(MpulsAppConfig.build_defaults, MpulsDBMapping.build_defaults):
+	Update doc-strings.
+
+2010-05-05  Bernhard Herzog  <bh at intevation.de>
+
 	* mpulsweb/lib/config.py (MpulsConfig.build_defaults): Simplify
 	the default implementation.
 

Modified: wasko/branches/2.0/mpulsweb/lib/config.py
===================================================================
--- wasko/branches/2.0/mpulsweb/lib/config.py	2010-05-05 14:04:48 UTC (rev 2660)
+++ wasko/branches/2.0/mpulsweb/lib/config.py	2010-05-05 14:11:43 UTC (rev 2661)
@@ -69,6 +69,7 @@
     """Dict-equivalent for default values that should not be merged recursively.
     """
 
+
 class MpulsConfig(object):
 
     def __init__(self, filename=None):
@@ -87,8 +88,11 @@
             merge(self.config, cfg)
 
     def build_defaults(self):
-        '''Set default configuration. This is function should be calles if
-        there is no config file'''
+        """Create the initial settings dictionary with default values.
+        The default implementation simply returns an empty dictionary.
+        Derived classes should override this method to provide the
+        appropriate default values.
+        """
         return {}
 
     def get(self, section, name):
@@ -98,11 +102,11 @@
             log.exception('Error on checking config (%s, %s)' % (section, name))
             return ''
 
+
 class MpulsAppConfig(MpulsConfig):
 
     def build_defaults(self):
-        '''Set default configuration. This is function should be calles if
-        there is no config file'''
+        """Build the default settings for an MPuls application"""
 
         sections = {}
 
@@ -331,11 +335,11 @@
         except KeyError:
             return key
 
+
 class MpulsDBMapping(MpulsConfig):
 
     def build_defaults(self):
-        '''Set default configuration. This is function should be calles if
-        there is no config file'''
+        """Build the default settings for the DB mapping"""
 
         sections = {}
 



More information about the Mpuls-commits mailing list