From ae33d880de1750c6cad28fa539f12c86a3497862 Mon Sep 17 00:00:00 2001
From: Marc Fiuczynski <mef@cs.princeton.edu>
Date: Fri, 1 Dec 2006 02:43:01 +0000
Subject: [PATCH] call init() function from gethelp()

---
 configs/kread.py | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

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 <mef@cs.princeton.edu>
 # 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:
-- 
2.47.0