|
From: <di...@us...> - 2011-06-11 15:59:13
|
Revision: 756
http://safekeep.svn.sourceforge.net/safekeep/?rev=756&view=rev
Author: dimi
Date: 2011-06-11 15:59:08 +0000 (Sat, 11 Jun 2011)
Log Message:
-----------
Do not use the -t ionice switch unless it is supported, it is missnig in some versions.
Modified Paths:
--------------
safekeep/trunk/safekeep
Modified: safekeep/trunk/safekeep
===================================================================
--- safekeep/trunk/safekeep 2011-06-11 15:52:27 UTC (rev 755)
+++ safekeep/trunk/safekeep 2011-06-11 15:59:08 UTC (rev 756)
@@ -916,11 +916,15 @@
ionice_cmd = 'ionice'
if ionice and ionice != 'none':
- if try_to_run(ionice_cmd) is not None:
+ ionice_out = try_to_run(ionice_cmd, '-h')
+ if ionice_out is not None:
if ionice is 'idle':
- args.extend([ionice_cmd, '-c3', '-t'])
+ args.extend([ionice_cmd, '-c3'])
else:
- args.extend([ionice_cmd, '-c2', '-n%s' % (ionice), '-t'])
+ args.extend([ionice_cmd, '-c2', '-n%s' % (ionice)])
+
+ if ionice_out.find('-t') > 0:
+ args.extend(['-t'])
else:
warn('ionice(1) not available, ignoring ionice.adjustment')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|