From 7c2c2d6130648fb6dd7c0e52d802cc6eff39ef95 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Mon, 30 Nov 2009 15:28:09 -0500 Subject: Add option to have ipautil.run() not raise an exception There are times where a caller will want to determine the course of action based on the returncode instead of relying on it != 0. This also lets the caller get the contents of stdout and stderr. --- ipaserver/install/service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipaserver/install/service.py') diff --git a/ipaserver/install/service.py b/ipaserver/install/service.py index a07a382a..75868898 100644 --- a/ipaserver/install/service.py +++ b/ipaserver/install/service.py @@ -54,7 +54,7 @@ def chkconfig_del(service_name): ipautil.run(["/sbin/chkconfig", "--del", service_name]) def is_enabled(service_name): - (stdout, stderr) = ipautil.run(["/sbin/chkconfig", "--list", service_name]) + (stdout, stderr, returncode) = ipautil.run(["/sbin/chkconfig", "--list", service_name]) runlevels = {} for runlevel in range(0, 7): -- cgit