Bug 1395392 - Clean up unnecessary variable. r=chmanchester

The `os` dereference here is only used in the error message,
and using it in the conditional tree doesn't really help
readability since it's too short; the target prefix is
helpful.

MozReview-Commit-ID: 4A8MpRH2r0p
This commit is contained in:
Ralph Giles 2017-08-30 16:39:06 -07:00
Родитель b0a2cdc0bd
Коммит d48e4560de
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -120,7 +120,6 @@ option('--enable-default-toolkit', nargs=1,
def toolkit(value, target, _):
# Define possible choices for each platform. The default is the first one
# listed when there are several.
os = target.os
if target.os == 'WINNT':
platform_choices = ('cairo-windows',)
elif target.os == 'OSX':
@ -135,7 +134,8 @@ def toolkit(value, target, _):
if value:
if value[0] not in platform_choices:
die('`%s` is not a valid value for --enable-default-toolkit on %s\n'
'Valid values: %s', value[0], os, ', '.join(platform_choices))
'Valid values: %s', value[0], target.os,
', '.join(platform_choices))
return value[0]
return platform_choices[0]