]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
buildman: fix to display warning message for missing [toolchain] section
authorMasahiro Yamada <yamada.m@jp.panasonic.com>
Mon, 7 Jul 2014 00:46:36 +0000 (09:46 +0900)
committerSimon Glass <sjg@chromium.org>
Mon, 7 Jul 2014 23:22:48 +0000 (17:22 -0600)
Toolchains.__init__ is expected to display a warning message
when the [toolchain] section is missing from ~/.buildman file.
But it never works.
In that case, instead, buildmain fails with an error message
which is difficult to understand:

  Traceback (most recent call last):
    File "tools/buildman/buildman", line 126, in <module>
      control.DoBuildman(options, args)
    File "/home/foo/u-boot/tools/buildman/control.py", line 78, in DoBuildman
      toolchains = toolchain.Toolchains()
    File "/home/foo/u-boot/tools/buildman/toolchain.py", line 106, in __init__
    config_fname)
  NameError: global name 'config_fname' is not defined

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Cc: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
tools/buildman/toolchain.py

index b64338680e9f3a0da02671779f9f9f11e37e169d..e392035ea5be75b30114a80cb945fe1d68ec8901 100644 (file)
@@ -103,7 +103,7 @@ class Toolchains:
         if not toolchains:
             print ("Warning: No tool chains - please add a [toolchain] section"
                  " to your buildman config file %s. See README for details" %
-                 config_fname)
+                 bsettings.config_fname)
 
         for name, value in toolchains:
             if '*' in value: