coff-dump.py: Fix PR7996. Now it is compatible to Python-2.4.

llvm-svn: 112485
This commit is contained in:
NAKAMURA Takumi 2010-08-30 15:19:56 +00:00
parent 2f463fc492
commit 89dab50acd

View File

@ -397,8 +397,11 @@ def handle_enum(entry):
selector = read_value (definitions [0])
definitions = definitions [1] [selector]
description = definitions[value] if value in definitions else "unknown"
if value in definitions:
description = definitions[value]
else:
description = "unknown"
write ("%s (" % description)
write_value (oformat, value)
write (")")