diff mbox

python/sepolicy/sepolicy/gui: Reflect sepolicy changes into gui

Message ID 1481036313-11915-2-git-send-email-vmojzis@redhat.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Vit Mojzis Dec. 6, 2016, 2:58 p.m. UTC
sepolicy.get_init_entrypoint() now returns list of Type objects
instead of single string, which caused sepolicy gui to crash.

Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
---
 python/sepolicy/sepolicy/gui.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stephen Smalley Dec. 6, 2016, 5:43 p.m. UTC | #1
On 12/06/2016 09:58 AM, Vit Mojzis wrote:
> sepolicy.get_init_entrypoint() now returns list of Type objects
> instead of single string, which caused sepolicy gui to crash.

Thanks, applied.

> 
> Signed-off-by: Vit Mojzis <vmojzis@redhat.com>
> ---
>  python/sepolicy/sepolicy/gui.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/python/sepolicy/sepolicy/gui.py b/python/sepolicy/sepolicy/gui.py
> index 3c5a9d2..6ccd02a 100644
> --- a/python/sepolicy/sepolicy/gui.py
> +++ b/python/sepolicy/sepolicy/gui.py
> @@ -512,8 +512,8 @@ class SELinuxGui():
>              self.progress_bar.set_pulse_step(self.percentage)
>              self.idle_func()
>  
> -            entrypoint = sepolicy.get_init_entrypoint(domain)
> -            if entrypoint:
> +            entrypoints = [str(x) for x in sepolicy.get_init_entrypoint(domain)]
> +            for entrypoint in entrypoints:
>                  path = sepolicy.find_entrypoint_path(entrypoint)
>                  if path:
>                      self.combo_box_initialize(path, None)
>
diff mbox

Patch

diff --git a/python/sepolicy/sepolicy/gui.py b/python/sepolicy/sepolicy/gui.py
index 3c5a9d2..6ccd02a 100644
--- a/python/sepolicy/sepolicy/gui.py
+++ b/python/sepolicy/sepolicy/gui.py
@@ -512,8 +512,8 @@  class SELinuxGui():
             self.progress_bar.set_pulse_step(self.percentage)
             self.idle_func()
 
-            entrypoint = sepolicy.get_init_entrypoint(domain)
-            if entrypoint:
+            entrypoints = [str(x) for x in sepolicy.get_init_entrypoint(domain)]
+            for entrypoint in entrypoints:
                 path = sepolicy.find_entrypoint_path(entrypoint)
                 if path:
                     self.combo_box_initialize(path, None)