From c6fff45fc2b4f5807d85d9fbfca62c3ea28842e1 Mon Sep 17 00:00:00 2001 From: Andres Salomon Date: Sat, 16 Jul 2005 03:31:36 +0000 Subject: [PATCH] i am a python GOD svn path=/trunk/kernel/source/linux-2.6-2.6.12/; revision=3533 --- debian/bin/split.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/debian/bin/split.py b/debian/bin/split.py index 9aadd0675..4dd8c27a9 100755 --- a/debian/bin/split.py +++ b/debian/bin/split.py @@ -7,15 +7,14 @@ # file is parsed to remove the common config options found in # config, with the results written to config.*.stub. # -import os, string, sys +import os, string, sys, re common = [] conffiles = [] def is_option(line): - result = (string.count(line, '#') > 0) - result = result or (len(string.strip(line)) == 0) - return not result + result = (len(string.strip(line)) != 0) and (re.match('^#*\s*CONFIG_\w+[\s=]', line)) + return result def is_not_common(line): return (line not in common)