Shorten if statement

Shorten if statement
This commit is contained in:
sammiee5311 2021-06-28 20:02:21 +09:00 committed by John Preston
parent c3fb392906
commit c1a7332a5e

View File

@ -22,7 +22,7 @@ def error(message):
print('[ERROR] ' + message) print('[ERROR] ' + message)
finish(1) finish(1)
if sys.platform == 'win32' and not 'COMSPEC' in os.environ: if sys.platform == 'win32' and 'COMSPEC' not in os.environ:
error('COMSPEC environment variable is not set.') error('COMSPEC environment variable is not set.')
executePath = os.getcwd() executePath = os.getcwd()
@ -39,9 +39,9 @@ if os.path.isfile(officialTargetFile):
officialTarget = line.strip() officialTarget = line.strip()
arch = '' arch = ''
if officialTarget == 'win' or officialTarget == 'uwp': if officialTarget in ['win', 'uwp']:
arch = 'x86' arch = 'x86'
elif officialTarget == 'win64' or officialTarget == 'uwp64': elif officialTarget in ['win64', 'uwp64']:
arch = 'x64' arch = 'x64'
if officialTarget != '': if officialTarget != '':