mirror of
https://github.com/SELinuxProject/selinux
synced 2025-04-29 14:18:02 +00:00
policycoreutils: gui: Start using Popen, instead of os.spawnl
Signed-off-by: Eric Paris <eparis@redhat.com> Acked-by: Dan Walsh <dwalsh@redhat.com>
This commit is contained in:
parent
019e6fd6d4
commit
45b324e27b
@ -26,6 +26,7 @@ import sys
|
|||||||
import seobject
|
import seobject
|
||||||
import selinux
|
import selinux
|
||||||
from semanagePage import *;
|
from semanagePage import *;
|
||||||
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
##
|
##
|
||||||
## I18N
|
## I18N
|
||||||
@ -88,7 +89,7 @@ class modulesPage(semanagePage):
|
|||||||
self.filter=filter
|
self.filter=filter
|
||||||
self.store.clear()
|
self.store.clear()
|
||||||
try:
|
try:
|
||||||
fd=os.popen("semodule -l")
|
fd = Popen("semodule -l", shell=True, stdout=PIPE).stdout
|
||||||
l = fd.readlines()
|
l = fd.readlines()
|
||||||
fd.close()
|
fd.close()
|
||||||
for i in l:
|
for i in l:
|
||||||
@ -105,7 +106,7 @@ class modulesPage(semanagePage):
|
|||||||
|
|
||||||
def new_module(self, args):
|
def new_module(self, args):
|
||||||
try:
|
try:
|
||||||
os.spawnl(os.P_NOWAIT, "/usr/share/system-config-selinux/polgengui.py")
|
Popen(["/usr/share/system-config-selinux/polgengui.py"])
|
||||||
except ValueError, e:
|
except ValueError, e:
|
||||||
self.error(e.args[0])
|
self.error(e.args[0])
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user