Skip to content

Commit e3d7f8a

Browse files
targosCommit Bot
authored andcommitted
[build] update gen-postmortem-metadata for Python 3
This change makes the code compatible with both Python 2 and Python 3. Change-Id: I99d68af9c3163607c3a2fdbafac339a98b7471e4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1751331 Commit-Queue: Yang Guo <yangguo@chromium.org> Reviewed-by: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#63207}
1 parent 8c4609f commit e3d7f8a

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

tools/gen-postmortem-metadata.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -653,9 +653,7 @@ def emit_config():
653653

654654
out.write('/* class type information */\n');
655655
consts = [];
656-
keys = typeclasses.keys();
657-
keys.sort();
658-
for typename in keys:
656+
for typename in sorted(typeclasses):
659657
klass = typeclasses[typename];
660658
consts.append({
661659
'name': 'type_%s__%s' % (klass, typename),
@@ -666,9 +664,7 @@ def emit_config():
666664

667665
out.write('/* class hierarchy information */\n');
668666
consts = [];
669-
keys = klasses.keys();
670-
keys.sort();
671-
for klassname in keys:
667+
for klassname in sorted(klasses):
672668
pklass = klasses[klassname]['parent'];
673669
bklass = get_base_class(klassname);
674670
if (bklass != 'Object'):

0 commit comments

Comments
 (0)