summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xkernel-check.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel-check.py b/kernel-check.py
index dc1fe37..85734ee 100755
--- a/kernel-check.py
+++ b/kernel-check.py
@@ -43,7 +43,12 @@ def main(argv):
print '>>> Gathering system information'
- kernel = lib.extract_version(os.uname()[2])
+ uname = os.uname()
+ if uname[0] != 'Linux':
+ error('This program currently only works for Linux kernels. Apparantly you are using "%s".' % (uname[0],) )
+ sys.exit(1)
+
+ kernel = lib.extract_version(uname[2])
best = lib.best_version(kernel.source)
if kernel is not None:
info('Kernel version: %s' % (color('GOOD', '%s-%s' %