Skip to content

Commit

Permalink
coff-dump.py: Fix PR7996. Now it is compatible to Python-2.4.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112485 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
chapuni committed Aug 30, 2010
1 parent 17d3983 commit 8794dd7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/Scripts/coff-dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (")")
Expand Down

0 comments on commit 8794dd7

Please sign in to comment.