Store the state of FwVM rules
This commit is contained in:
parent
6f39a4d096
commit
b20ad15ff2
@ -781,6 +781,7 @@ class VmManagerWindow(QMainWindow):
|
|||||||
["/usr/bin/xenstore-read", error_file],
|
["/usr/bin/xenstore-read", error_file],
|
||||||
stdout=subprocess.PIPE).communicate()[0]
|
stdout=subprocess.PIPE).communicate()[0]
|
||||||
if error != "":
|
if error != "":
|
||||||
|
vm.rules_applied = False
|
||||||
trayIcon.showMessage (
|
trayIcon.showMessage (
|
||||||
"Error applying firewall rules on '{0}'!".format(vm.name),
|
"Error applying firewall rules on '{0}'!".format(vm.name),
|
||||||
"ERROR: {0}".format(error.decode('string_escape')),
|
"ERROR: {0}".format(error.decode('string_escape')),
|
||||||
@ -788,6 +789,8 @@ class VmManagerWindow(QMainWindow):
|
|||||||
)
|
)
|
||||||
retcode = subprocess.check_call (
|
retcode = subprocess.check_call (
|
||||||
["/usr/bin/xenstore-write", error_file, ""])
|
["/usr/bin/xenstore-write", error_file, ""])
|
||||||
|
else:
|
||||||
|
vm.rules_applied = True
|
||||||
|
|
||||||
class QubesTrayIcon(QSystemTrayIcon):
|
class QubesTrayIcon(QSystemTrayIcon):
|
||||||
def __init__(self, icon):
|
def __init__(self, icon):
|
||||||
|
Loading…
Reference in New Issue
Block a user