From a19a8146114bff775950e143394991ea6acc95a2 Mon Sep 17 00:00:00 2001 From: Jose Diez Date: Fri, 16 Oct 2015 11:13:34 -0700 Subject: [PATCH] Bug 1213816 - Properly set OS properties on Arch; r=gps --- testing/mozbase/mozinfo/mozinfo/mozinfo.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/testing/mozbase/mozinfo/mozinfo/mozinfo.py b/testing/mozbase/mozinfo/mozinfo/mozinfo.py index 6b24601a63a..085555c1797 100755 --- a/testing/mozbase/mozinfo/mozinfo/mozinfo.py +++ b/testing/mozbase/mozinfo/mozinfo/mozinfo.py @@ -90,6 +90,16 @@ elif system == "Linux": if not processor: processor = machine version = "%s %s" % (distro, os_version) + + # Bug in Python 2's `platform` library: + # It will return a triple of empty strings on Arch. + # It works on Python 3. If we don't have an OS version, + # the unit tests fail to run. + if not os_version and "ARCH" in release: + distro = 'arch' + version = release + os_version = release + info['os'] = 'linux' info['linux_distro'] = distro elif system in ['DragonFly', 'FreeBSD', 'NetBSD', 'OpenBSD']: