Compare the distro_id in lowercase

For me 'distro.id()' returned 'ubuntu' and thats not equal to 'Ubuntu'.
This patch converts the distro id to lowercase before comparing it.

Signed-off-by: Claudius Heine <ch@denx.de>
This commit is contained in:
Claudius Heine 2017-07-03 13:46:34 +02:00 committed by Daniel Wagner
parent dd04836896
commit 6f37db72d4

View File

@ -79,11 +79,11 @@ class Config:
started by kas.
"""
distro_id = get_distro_id()
if distro_id in ['fedora', 'SuSE', 'opensuse']:
if distro_id.lower() in ['fedora', 'suse', 'opensuse']:
self.environ = {'LC_ALL': 'en_US.utf8',
'LANG': 'en_US.utf8',
'LANGUAGE': 'en_US'}
elif distro_id in ['Ubuntu', 'debian']:
elif distro_id.lower() in ['debian', 'ubuntu']:
self.environ = {'LC_ALL': 'en_US.UTF-8',
'LANG': 'en_US.UTF-8',
'LANGUAGE': 'en_US:en'}