r4302 - dists/trunk/linux-2.6/debian/lib/python

Bastian Blank waldi at costa.debian.org
Mon Oct 3 20:45:03 UTC 2005


Author: waldi
Date: 2005-10-03 20:45:02 +0000 (Mon, 03 Oct 2005)
New Revision: 4302

Modified:
   dists/trunk/linux-2.6/debian/lib/python/debian_linux.py
Log:
debian/lib/python/debian_linux.py: Don't bail out on unknown keys.


Modified: dists/trunk/linux-2.6/debian/lib/python/debian_linux.py
===================================================================
--- dists/trunk/linux-2.6/debian/lib/python/debian_linux.py	2005-10-03 20:24:25 UTC (rev 4301)
+++ dists/trunk/linux-2.6/debian/lib/python/debian_linux.py	2005-10-03 20:45:02 UTC (rev 4302)
@@ -9,33 +9,16 @@
             return False
         raise Error
 
-class schema_item_integer(object):
-    def __call__(self, i):
-        return int(i)
-
 class schema_item_list(object):
     def __call__(self, i):
         return re.split("\s+", i.strip())
 
-class schema_item_string(object):
-    def __call__(self, i):
-        return str(i)
-
 class config(dict):
     schema = {
-        'abiname': schema_item_string,
         'arches': schema_item_list,
         'available': schema_item_boolean,
-        'class': schema_item_string,
-        'compiler': schema_item_string,
-        'depends': schema_item_string,
-        'desc': schema_item_string,
         'flavours': schema_item_list,
-        'kernel-arch': schema_item_string,
-        'kpkg-subarch': schema_item_string,
-        'longclass': schema_item_string,
         'subarches': schema_item_list,
-        'suggests': schema_item_string,
     }
 
     config_name = "defines"
@@ -126,8 +109,11 @@
         items = self.items(section)
         ret = {}
         for key, value in items:
-            convert = self.schema[key]()
-            ret[key] = convert(value)
+            try:
+                convert = self.schema[key]()
+                value = convert(value)
+            except KeyError: pass
+            ret[key] = value
         return ret
 
 class _sorted_dict(dict):




More information about the Kernel-svn-changes mailing list