Bug 1288313 - Explicitly reject unknown CPU types. r=chmanchester

Since bug 1264482, unknown CPU types end up triggering a ValueError
exception because of the CPU EnumString. Even if somehow the CPU is
valid, the endianness is not and would trigger a ValueError exception
as well.

So, instead of letting the exceptions happen, use a nicer failure mode
with an explicit die().

--HG--
extra : rebase_source : 68432496712075c677de4bf71ea5d420fc70c35c
This commit is contained in:
Mike Hommey 2016-04-26 16:27:46 +09:00
Родитель 7bed0135a2
Коммит 2578400d7b
1 изменённых файлов: 1 добавлений и 2 удалений

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

@ -413,8 +413,7 @@ def split_triplet(triplet):
canonical_cpu = 'aarch64'
endianness = 'little'
else:
canonical_cpu = cpu
endianness = 'unknown'
die('Unknown CPU type: %s' % cpu)
return namespace(
alias=triplet,