From 9f91d82b07dbf49c11f3124bd9de8d359ce98326 Mon Sep 17 00:00:00 2001
From: Peter Johnson <peter@tortall.net>
Date: Sun, 6 Dec 2009 03:37:43 +0000
Subject: [PATCH] Unbreak gen_x86_insn.py on Python 2.4.

Patch by: Alexei Svitkine <alexei.svitkine@gmail.com>

svn path=/trunk/yasm/; revision=2242
---
 modules/arch/x86/gen_x86_insn.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/arch/x86/gen_x86_insn.py b/modules/arch/x86/gen_x86_insn.py
index b7d6428a..40147358 100755
--- a/modules/arch/x86/gen_x86_insn.py
+++ b/modules/arch/x86/gen_x86_insn.py
@@ -608,7 +608,10 @@ def output_groups(f):
     # Merge all operand lists into single list
     # Sort by number of operands to shorten output
     all_operands = []
-    gi = groups.itervalues() if version_info[0] == 2 else groups.values()    
+    if version_info[0] == 2:
+        gi = groups.itervalues()
+    else:
+        gi = groups.values()
     for form in sorted((form for g in gi for form in g),
                        key=lambda x:len(x.operands), reverse=True):
         num_operands = len(form.operands)
-- 
2.40.0