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 <vmojzis@redhat.com>
This commit is contained in:
Vit Mojzis 2018-02-22 14:29:33 +01:00 committed by Stephen Smalley
parent 8caec179c3
commit 6f4b1bbdea

View File

@ -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: