Skip to content

Commit

Permalink
Make grit's target platform compatible with python 3.
Browse files Browse the repository at this point in the history
Since python 3.3 sys.platform doesn't contain the major version on linux.

Bug: 1112471
Change-Id: I29bad863bbb04f30eaa727263502a0650ba5785e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2718153
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#859035}
  • Loading branch information
Istota42 authored and Chromium LUCI CQ committed Mar 2, 2021
1 parent da73a62 commit 84ef659
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/grit/grit/node/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,8 @@ def EvaluateExpression(cls, expr, defs, target_platform, extra_variables={}):
elif name == 'is_bsd':
value = 'bsd' in target_platform
elif name == 'is_posix':
value = (target_platform in ('darwin', 'linux2', 'linux3', 'sunos5',
'android', 'ios')
value = (target_platform.startswith('linux')
or target_platform in ('darwin', 'sunos5', 'android', 'ios')
or 'bsd' in target_platform)

elif name == 'pp_ifdef':
Expand Down

0 comments on commit 84ef659

Please sign in to comment.