mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-11-02 20:30:26 -06:00
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.
This commit is contained in:
1 parent
29aa8fb05d
commit
7c2c2d6130
6 files changed
+17
-17
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user