From e1ebbbce59ee07b045c4b367e8cf656520cd6b43 Mon Sep 17 00:00:00 2001 From: Paul Wise Date: Wed, 17 Mar 2010 17:44:29 +0700 Subject: [PATCH] Do not report requirements that are available. Closes: http://bugs.debian.org/574246 --- iotop/data.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/iotop/data.py b/iotop/data.py index bdd900d..a55a2bf 100644 --- a/iotop/data.py +++ b/iotop/data.py @@ -42,14 +42,13 @@ else: has_ctypes = True if not ioaccounting or not has_ctypes: - def boolean2string(boolean): - return boolean and 'Found' or 'Not found' print 'Could not run iotop as some of the requirements are not met:' - print '- Linux >= 2.6.20 with I/O accounting support ' \ - '(CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, ' \ - 'CONFIG_TASK_IO_ACCOUNTING):', boolean2string(ioaccounting) - print '- Python >= 2.5 or Python 2.4 with the ctypes module:', \ - boolean2string(has_ctypes) + if not ioaccounting: + print '- Linux >= 2.6.20 with I/O accounting support ' \ + '(CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, ' \ + 'CONFIG_TASK_IO_ACCOUNTING)' + if not has_ctypes: + print '- Python >= 2.5 or Python 2.4 with the ctypes module' sys.exit(1) -- 2.11.4.GIT