diff options
-rwxr-xr-x | scripts/pnodes.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/scripts/pnodes.py b/scripts/pnodes.py index a753c7957..a5430c879 100755 --- a/scripts/pnodes.py +++ b/scripts/pnodes.py @@ -464,16 +464,14 @@ def gen_choices(choices): """Generate a choice 'when A | B ... Z =>' using elements of CHOICES.""" is_first = True for c in choices: + ch = prefix_name + c if is_first: - print(" ", end='') - print("when", end='') + is_first = False + print(" when " + ch, end='') else: print() - print(" ", end='') - print(" |", end='') - print(prefix_name + c, end='') - is_first = False - print("=>") + print(" | " + ch, end='') + print(" =>") def gen_get_format(formats, nodes, kinds): |