From 6f4b1bbdea53f7b2086291238cd01befd7dd2c19 Mon Sep 17 00:00:00 2001 From: Vit Mojzis Date: Thu, 22 Feb 2018 14:29:33 +0100 Subject: [PATCH] gui/semanagePage: Close "edit" and "add" dialogues when successfull "Edit" and "add" dialogues weren't closed after successful transaction ("add" and "edit" methods return "None" if successful). Signed-off-by: Vit Mojzis --- gui/semanagePage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/semanagePage.py b/gui/semanagePage.py index 560ec077..4127804f 100644 --- a/gui/semanagePage.py +++ b/gui/semanagePage.py @@ -140,7 +140,7 @@ class semanagePage: while self.dialog.run() == Gtk.ResponseType.OK: try: - if not self.add(): + if self.add() is False: continue break except ValueError as e: @@ -153,7 +153,7 @@ class semanagePage: self.dialog.set_position(Gtk.WindowPosition.MOUSE) while self.dialog.run() == Gtk.ResponseType.OK: try: - if not self.modify(): + if self.modify() is False: continue break except ValueError as e: