]> granicus.if.org Git - yasm/commitdiff
Unbreak gen_x86_insn.py on Python 2.4.
authorPeter Johnson <peter@tortall.net>
Sun, 6 Dec 2009 03:37:43 +0000 (03:37 -0000)
committerPeter Johnson <peter@tortall.net>
Sun, 6 Dec 2009 03:37:43 +0000 (03:37 -0000)
Patch by: Alexei Svitkine <alexei.svitkine@gmail.com>

svn path=/trunk/yasm/; revision=2242

modules/arch/x86/gen_x86_insn.py

index b7d6428af70356797ee0bab74ae6298ad9efed6d..40147358549088e5213346dfae49a1079501b14e 100755 (executable)
@@ -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)