[kernel] r9999 - people/waldi/dkt/lib/dkt/config

Bastian Blank waldi at alioth.debian.org
Fri Dec 21 11:16:50 UTC 2007


Author: waldi
Date: Fri Dec 21 11:16:50 2007
New Revision: 9999

Log:
lib/dkt/config/base.py
- Export section name.
- Remove unnecessary default checks.


Modified:
   people/waldi/dkt/lib/dkt/config/base.py

Modified: people/waldi/dkt/lib/dkt/config/base.py
==============================================================================
--- people/waldi/dkt/lib/dkt/config/base.py	(original)
+++ people/waldi/dkt/lib/dkt/config/base.py	Fri Dec 21 11:16:50 2007
@@ -63,7 +63,7 @@
     def add_section(self, section):
         s = self._sections.get(section, _marker)
         if s == _marker:
-            self._sections[section] = {}
+            self._sections[section] = {'__name__': section}
 
     def delete(self, section, option):
         del self._sections[section][option]
@@ -72,8 +72,6 @@
         del self._sections[section]
 
     def set(self, section, option, value):
-        s = self._sections.get(section, _marker)
-        if s == _marker:
-            raise KeyError(section)
+        s = self._sections.get(section)
         s[option] = value
 



More information about the Kernel-svn-changes mailing list