diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-07-04 22:40:29 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-07-04 22:40:29 (GMT) |
commit | d1bf08573a4e49b1db2c8f2abef528fddd7f025e (patch) | |
tree | ff9fb6645b8681c8dd8b9f00b0c80a047f3ede84 | |
parent | 48369e6a86a508d0e5f7c0e64e11f0d20709f39b (diff) |
Fix distro checks
-rwxr-xr-x | scripts/check-system | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/check-system b/scripts/check-system index 7045bb3..75498b2 100755 --- a/scripts/check-system +++ b/scripts/check-system @@ -364,7 +364,7 @@ def check_distro(): # Fedora try: - fedora_release = open("/etc/fedora-release").read() + fedora_release = open("/etc/fedora-release").read().strip() if fedora_release == "Fedora release 17 (Beefy Miracle)": distro = "fedora" except IOError: @@ -380,12 +380,13 @@ def check_distro(): except OSError: pass - if subprocess.check_output(["uname", "-i"]) not in ["i386", "x86_64"]: + arch = subprocess.check_output(["uname", "-i"]).strip() + if arch not in ["i386", "x86_64"]: distro = "unsupported" return distro -def warn_about_unsupported_distro(): +def warn_if_unsupported(distro): if distro == "unsupported": print "*********************************************************\n" \ "You are running an unsupported distribution. You might be\n" \ @@ -403,6 +404,6 @@ xvfb_proc, orig_display = start_xvfb() run_checks(distro, checks) -warn_about_unsupported_distro() +warn_if_unsupported(distro) stop_xvfb(xvfb_proc, orig_display) |