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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112485 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
NAKAMURA Takumi 2010-08-30 15:19:56 +00:00
parent 17d3983730
commit 8794dd794e

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 (")")