[kernel] r10328 - people/waldi/dkt/lib/dkt/systemconfig
Bastian Blank
waldi at alioth.debian.org
Thu Jan 31 10:40:02 UTC 2008
Author: waldi
Date: Thu Jan 31 10:40:02 2008
New Revision: 10328
Log:
lib/dkt/systemconfig/file.py: Use file.Config as base.
Modified:
people/waldi/dkt/lib/dkt/systemconfig/file.py
Modified: people/waldi/dkt/lib/dkt/systemconfig/file.py
==============================================================================
--- people/waldi/dkt/lib/dkt/systemconfig/file.py (original)
+++ people/waldi/dkt/lib/dkt/systemconfig/file.py Thu Jan 31 10:40:02 2008
@@ -2,23 +2,20 @@
_marker = object()
-class SystemConfig(object):
- __slots__ = "_config", "_lists"
+class SystemConfig(file.Config):
+ __slots__ = "_lists"
def __init__(self, fp):
- self._lists = {}
+ super(SystemConfig, self).__init__(fp)
- self._config = c = file.Config(fp)
+ self._lists = {}
- for s in c._sections.itervalues():
+ for s in self._sections.itervalues():
name = s['__type__']
s1 = self._lists.get(name, [])
s1.append(s)
self._lists[name] = s1
- def __getattr__(self, name):
- return getattr(self._config, name)
-
def get_sectionlist(self, name, default = _marker):
l = self._lists.get(name, _marker)
if l is _marker:
More information about the Kernel-svn-changes
mailing list