Commit bb66bb44 authored by legton's avatar legton

Merge branch 'issue/423' into 'develop'

SCRUM#423: Change control panel error messages regarding the family-shield

See merge request !74
parents 18f78339 dca46bef
Pipeline #18768 passed with stages
in 6 minutes and 1 second
le-control-panel (1.0.7) unstable; urgency=medium
* Change control panel error messages regarding the family-shield
-- Guilherme Becker Agge <lesuporte@c3sl.ufpr.br> Wed, 05 Dec 2018 10:26:05 -0200
le-control-panel (1.0.6) unstable; urgency=medium
* Fix a bug in the family shield options
......
......@@ -31,7 +31,7 @@ import apt
import apt_pkg
import socket
import sys
from subprocess import Popen, PIPE
from subprocess import Popen, PIPE, check_output
from pwd import getpwall
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk, GObject # noqa: E402
......@@ -90,10 +90,18 @@ class Handler:
out = os.system(family_shield_cmds.get(state, "Invalid_command"))
if (out != 0):
self.error_mode = True
self.createErrorMessage(switch, getWindow(switch),
"Não foi possível alterar "
" o estado corretamente")
fsAnnouncer = check_output(['family-shield', '-s', '-n'])
fsAnnouncer = fsAnnouncer.split()[-1]
if (fsAnnouncer != 'network'):
self.createErrorMessage(switch, getWindow(switch),
"O Family-Shield já está "
"sendo anunciado na rede.\n"
"Por favor mude o estado no "
"host"+fsAnnouncer)
else:
self.createErrorMessage(switch, getWindow(switch),
"Não foi possível alterar "
"o estado corretamente")
return True
def onToggleAutoUpdates(self, switch, args):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment