tags 574246 + patch upstream confirmed thanks On Tue, 2010-03-16 at 21:23 -0300, Nelson A. de Oliveira wrote:
> While running iotop here: > > Could not run iotop as some of the requirements are not met: > - Linux >= 2.6.20 with I/O accounting support (CONFIG_TASKSTATS, > CONFIG_TASK_DELAY_ACCT, CONFIG_TASK_IO_ACCOUNTING): Not found > - Python >= 2.5 or Python 2.4 with the ctypes module: Found > > It could only print the unmet requirements, instead printing both. It's easier > to spot only what is missing (it's not necessary to say that I have the > necessary python version to run it, for example). I've attached a patch to implement the above request, it would be nice if you could apply the patch to your git repository. Since it is a wishlist request, releasing a new version with it is not urgent. -- bye, pabs http://wiki.debian.org/PaulWise
From aa0b418420a77d719ffd56f6b54f7777f1f86f50 Mon Sep 17 00:00:00 2001 From: Paul Wise <[email protected]> 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 files changed, 6 insertions(+), 7 deletions(-) diff --git a/iotop/data.py b/iotop/data.py index bbe3e27..36c3b0d 100644 --- a/iotop/data.py +++ b/iotop/data.py @@ -24,14 +24,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) -- 1.7.0
signature.asc
Description: This is a digitally signed message part

