Commit 9e379598 authored by Raul Tambre's avatar Raul Tambre Committed by Commit Bot

gpu: Convert a use of has_key()

has_key() has been removed in Python 3.
Use the 'in' operator which works in both Python 2 and 3.

Traceback (most recent call last):
  File "../../gpu/config/process_json.py", line 961, in <module>
    sys.exit(main(sys.argv[1:]))
  File "../../gpu/config/process_json.py", line 935, in main
    process_software_rendering_list(
  File "../../gpu/config/process_json.py", line 810, in process_software_rendering_list
    process_json_file(
  File "../../gpu/config/process_json.py", line 771, in process_json_file
    write_entry(entry, total_features, feature_tag, unique_symbol_id,
  File "../../gpu/config/process_json.py", line 677, in write_entry
    write_conditions(entry_id, False, -1, entry, unique_symbol_id,
  File "../../gpu/config/process_json.py", line 525, in write_conditions
    if driver_version.has_key('value2'):
AttributeError: 'dict' object has no attribute 'has_key'

Bug: 941669
Change-Id: Ib0f629fdcd7d1a72c4b1dd5f846a33007154e46d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2130267Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Raul Tambre <raul@tambre.ee>
Auto-Submit: Raul Tambre <raul@tambre.ee>
Cr-Commit-Position: refs/heads/master@{#755043}
parent 73f2b808
...@@ -522,7 +522,7 @@ def write_conditions(entry_id, is_exception, exception_id, entry, ...@@ -522,7 +522,7 @@ def write_conditions(entry_id, is_exception, exception_id, entry,
or intel_gpu_generation or 'Intel' in driver_vendor): or intel_gpu_generation or 'Intel' in driver_vendor):
if not check_intel_driver_version(driver_version['value']): if not check_intel_driver_version(driver_version['value']):
assert False, INTEL_DRIVER_VERSION_SCHEMA assert False, INTEL_DRIVER_VERSION_SCHEMA
if driver_version.has_key('value2'): if 'value2' in driver_version:
if not check_intel_driver_version(driver_version['value2']): if not check_intel_driver_version(driver_version['value2']):
assert False, INTEL_DRIVER_VERSION_SCHEMA assert False, INTEL_DRIVER_VERSION_SCHEMA
......
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