--
Reviewed-by: Paulo Vital <pvital(a)linux.vnet.ibm.com>
On Tue, 2014-03-25 at 11:21 -0300, Leonardo Garcia wrote:
From: Leonardo Garcia <lagarcia(a)br.ibm.com>
Instead of doing two comparisons, make just one and make this check
faster.
Signed-off-by: Leonardo Garcia <lagarcia(a)br.ibm.com>
---
src/kimchi/model/debugreports.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/src/kimchi/model/debugreports.py b/src/kimchi/model/debugreports.py
index 6ae282a..479d936 100644
--- a/src/kimchi/model/debugreports.py
+++ b/src/kimchi/model/debugreports.py
@@ -68,10 +68,7 @@ class DebugReportsModel(object):
command = ['sosreport', '--batch', '--name=%s' %
name]
output, error, retcode = run_command(command)
- if retcode < 0:
- raise OperationFailed("KCHDR0003E", {'name': name,
- 'err': retcode})
- elif retcode > 0:
+ if retcode != 0:
raise OperationFailed("KCHDR0003E", {'name': name,
'err': retcode})