From: Marc Fiuczynski Date: Fri, 1 Dec 2006 02:43:01 +0000 (+0000) Subject: call init() function from gethelp() X-Git-Tag: before-fedora-2_6_18-1_2255_FC5-vs2_0_2_2-rc9~11 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=ae33d880de1750c6cad28fa539f12c86a3497862;p=linux-2.6.git call init() function from gethelp() --- diff --git a/configs/kread.py b/configs/kread.py index 24dc99ff5..c5366691c 100755 --- a/configs/kread.py +++ b/configs/kread.py @@ -5,7 +5,7 @@ # Marc E. Fiuczynski # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: kread.py,v 1.1 2006/11/30 23:02:35 mef Exp $ +# $Id: kread.py,v 1.2 2006/12/01 02:40:40 mef Exp $ # import sys, re, os @@ -64,15 +64,20 @@ def process(filename): fb.close() +initialized = False +def init(): + if not initialized: + initialized = True + ARCH=os.getenv("ARCH","i386") + process("arch/%s/Kconfig" % ARCH) + def gethelp(option): if option[:len("CONFIG_")] == "CONFIG_": option=option[len("CONFIG_"):] + init() helptxt = configs.get(option,"") return helptxt -def init(): - ARCH=os.getenv("ARCH","i386") - process("arch/%s/Kconfig" % ARCH) if __name__ == '__main__': if len(sys.argv) == 1: