Commit 928cf307 authored by Raul Tambre's avatar Raul Tambre Committed by Commit Bot

base/win/embedded_i18n/create_string_rc.py: Python 3 support

This change is backwards compatible with Python 2 and functionally equivalent.

Traceback (most recent call last):
  File "../../base/win/embedded_i18n/create_string_rc.py", line 601, in <module>
    sys.exit(main())
  File "../../base/win/embedded_i18n/create_string_rc.py", line 578, in main
    mode_specific_strings.itervalues().next().iterkeys()]
AttributeError: 'dict' object has no attribute 'itervalues'

Bug: 941669
Change-Id: I2d26e810bf98840cdae46c0a0de249bf0b19f5ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1829208
Auto-Submit: Raul Tambre <raul@tambre.ee>
Reviewed-by: default avatarBruce Dawson <brucedawson@chromium.org>
Commit-Queue: Raul Tambre <raul@tambre.ee>
Cr-Commit-Position: refs/heads/master@{#701556}
parent 4487fa29
...@@ -575,7 +575,7 @@ def main(): ...@@ -575,7 +575,7 @@ def main():
parser.error('A brand was specified (' + brand + ') but no mode ' parser.error('A brand was specified (' + brand + ') but no mode '
'specific strings were given.') 'specific strings were given.')
valid_brands = [b for b in valid_brands = [b for b in
mode_specific_strings.itervalues().next().iterkeys()] next(iter(mode_specific_strings.values())).keys()]
if not brand in valid_brands: if not brand in valid_brands:
parser.error('A brand was specified (' + brand + ') but it is not ' parser.error('A brand was specified (' + brand + ') but it is not '
'a valid brand [' + ', '.join(valid_brands) + '].') 'a valid brand [' + ', '.join(valid_brands) + '].')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment