[kernel] r18498 - dists/trunk/linux-2.6/debian/lib/python/debian_linux

Bastian Blank waldi at alioth.debian.org
Wed Jan 11 20:34:38 UTC 2012


Author: waldi
Date: Wed Jan 11 20:34:37 2012
New Revision: 18498

Log:
debian/lib/python/debian_linux/config.py: Read pickled config.

Modified:
   dists/trunk/linux-2.6/debian/lib/python/debian_linux/config.py

Modified: dists/trunk/linux-2.6/debian/lib/python/debian_linux/config.py
==============================================================================
--- dists/trunk/linux-2.6/debian/lib/python/debian_linux/config.py	Wed Jan 11 20:32:03 2012	(r18497)
+++ dists/trunk/linux-2.6/debian/lib/python/debian_linux/config.py	Wed Jan 11 20:34:37 2012	(r18498)
@@ -81,22 +81,9 @@
         cPickle.dump(self, fp, -1)
 
 
-class ConfigCoreDump(ConfigCore):
-    def __init__(self, config=None, fp=None):
-        super(ConfigCoreDump, self).__init__(self)
-        if config is not None:
-            self.update(config)
-        if fp is not None:
-            from ConfigParser import RawConfigParser
-            config = RawConfigParser()
-            config.readfp(fp)
-            for section in config.sections():
-                section_real = eval(section)
-                data = {}
-                for key, value in config.items(section):
-                    value_real = eval(value)
-                    data[key] = value_real
-                self[section_real] = data
+class ConfigCoreDump(object):
+    def __new__(self, fp):
+        return cPickle.load(fp)
 
 
 class ConfigCoreHierarchy(object):



More information about the Kernel-svn-changes mailing list