]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
bb.pysh: add Case support to format_commands
authorChris Larson <chris_larson@mentor.com>
Thu, 11 Nov 2010 15:57:15 +0000 (08:57 -0700)
committerChris Larson <chris_larson@mentor.com>
Thu, 11 Nov 2010 15:57:15 +0000 (08:57 -0700)
Signed-off-by: Chris Larson <chris_larson@mentor.com>
lib/bb/pysh/pyshyacc.py

index 6b2bf466d22c583b81363d725e2eeaa91424cdf6..8bb992732112adb23dbe75c5737c57bb04bb6a7d 100644 (file)
@@ -707,6 +707,9 @@ def format_commands(v):
         if v.reverse_status:
             name = '!' + name
         return [name, format_commands(v.commands)]
+    elif isinstance(v, Case):
+        name = ['Case']
+        name += [v.name, format_commands(v.items)]
     elif isinstance(v, SimpleCommand):
         name = ['SimpleCommand']
         if v.words: