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/httpinstance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ipaserver/install/httpinstance.py') diff --git a/ipaserver/install/httpinstance.py b/ipaserver/install/httpinstance.py index 7e7adfa79..94e155bf0 100644 --- a/ipaserver/install/httpinstance.py +++ b/ipaserver/install/httpinstance.py @@ -100,7 +100,7 @@ class HTTPInstance(service.Service): if selinux: try: # returns e.g. "httpd_can_network_connect --> off" - (stdout, stderr) = ipautil.run(["/usr/sbin/getsebool", + (stdout, stderr, returncode) = ipautil.run(["/usr/sbin/getsebool", "httpd_can_network_connect"]) self.backup_state("httpd_can_network_connect", stdout.split()[2]) except: -- cgit