Skip to content

Commit

Permalink
Make gpu/config/process_json.py work with Python 3.
Browse files Browse the repository at this point in the history
dict.has_key() does not exist in Python 3. Just use dict.get() to achieve
the same result with fewer checks.

Bug: 941669
Change-Id: Iaeec0ac1ec8efd88c796c73344fea91eaab0df7f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2236435
Auto-Submit: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776583}
  • Loading branch information
Raphael Kubo da Costa authored and Commit Bot committed Jun 9, 2020
1 parent 9c47dde commit 67b9c44
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gpu/config/process_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,7 @@ def write_conditions(entry_id, is_exception, exception_id, entry,
write_multi_gpu_style(multi_gpu_style, data_file)
# group driver info
if driver_vendor != '' or driver_version != None:
if (driver_version and driver_version.has_key('schema') and
driver_version['schema'] == 'intel_driver'):
if driver_version and driver_version.get('schema') == 'intel_driver':
assert os_type == 'win', 'Intel driver schema is only for Windows'
is_intel = (format(vendor_id, '#04x') == '0x8086' or
intel_gpu_series_list or
Expand Down

0 comments on commit 67b9c44

Please sign in to comment.