mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-26 04:22:30 -10:00
Bug 1583582 - Mach should not depend on fields in /etc/os-release. r=kvark
Some fields of /etc/os-release are optional, so do not throw KeyError's when they're missing. Differential Revision: https://phabricator.services.mozilla.com/D48984
This commit is contained in:
1 parent
d60330c027
commit
11890702b9
1 file changed
+3
-3
@@ -256,9 +256,9 @@ class Bootstrapper(object):
|
||||
for line in open('/etc/os-release'):
|
||||
k, v = line.rstrip().split("=")
|
||||
d[k] = v.strip('"')
|
||||
distro = d["NAME"]
|
||||
version = d["VERSION_ID"]
|
||||
dist_id = d["ID"]
|
||||
distro = d.get("NAME")
|
||||
version = d.get("VERSION_ID")
|
||||
dist_id = d.get("ID")
|
||||
|
||||
if distro in ('CentOS', 'CentOS Linux', 'Fedora'):
|
||||
cls = CentOSFedoraBootstrapper
|
||||
|
||||
Reference in new issue
Block a user