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

Bastian Blank waldi at alioth.debian.org
Wed Jul 25 11:58:27 UTC 2007


Author: waldi
Date: Wed Jul 25 11:58:26 2007
New Revision: 9199

Log:
lib/dkt/config/base.py
(Config): Fix KeyError usage.


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	Wed Jul 25 11:58:26 2007
@@ -18,12 +18,12 @@
         s = self._data.get(section, _marker)
         if s == _marker:
             if default == _marker:
-                raise KeyError
+                raise KeyError(section)
             return default
         o = s.get(option, _marker)
         if o == _marker:
             if default == _marker:
-                raise KeyError
+                raise KeyError(option)
             return default
         return o
 
@@ -31,14 +31,14 @@
         s = self._data.get(section, _marker)
         if s == _marker:
             if default == _marker:
-                raise KeyError
+                raise KeyError(section)
             return default
         return s.copy()
 
     def iteroptions(self, section):
         s = self._data.get(section, _marker)
         if s == _marker:
-            raise KeyError
+            raise KeyError(section)
         return s.iterkeys()
 
     def itersections(self):
@@ -47,7 +47,7 @@
     def options(self, section):
         s = self._data.get(section, _marker)
         if s == _marker:
-            raise KeyError
+            raise KeyError(section)
         return s.keys()
 
     def sections(self):
@@ -70,6 +70,6 @@
     def set(self, section, option, value):
         s = self._data.get(section, _marker)
         if s == _marker:
-            raise KeyError
+            raise KeyError(section)
         s[option] = value
 



More information about the Kernel-svn-changes mailing list