forked from Support/sp-hydra-veil-gui
update: updated firewall exception handling
This commit is contained in:
parent
23dbf97309
commit
b502f9130d
2 changed files with 12 additions and 8 deletions
|
|
@ -986,6 +986,8 @@ class MenuPage(Page):
|
||||||
return
|
return
|
||||||
self.worker_thread = WorkerThread(
|
self.worker_thread = WorkerThread(
|
||||||
'DISABLE_PROFILE', profile_data=profile_data)
|
'DISABLE_PROFILE', profile_data=profile_data)
|
||||||
|
self.worker_thread.text_output.connect(
|
||||||
|
lambda text: self.update_status.update_status(str(text)))
|
||||||
self.worker_thread.finished.connect(self.on_disconnect_done)
|
self.worker_thread.finished.connect(self.on_disconnect_done)
|
||||||
self.worker_thread.start()
|
self.worker_thread.start()
|
||||||
|
|
||||||
|
|
@ -1196,7 +1198,7 @@ class MenuPage(Page):
|
||||||
self.popup.show()
|
self.popup.show()
|
||||||
return
|
return
|
||||||
|
|
||||||
if profile_id < 0:
|
if profile_id is not None and profile_id < 0:
|
||||||
self.DisplayInstallScreen(text)
|
self.DisplayInstallScreen(text)
|
||||||
return
|
return
|
||||||
if is_enabled:
|
if is_enabled:
|
||||||
|
|
|
||||||
|
|
@ -136,11 +136,11 @@ class WorkerThread(QThread):
|
||||||
profile, ignore=True, profile_observer=profile_observer)
|
profile, ignore=True, profile_observer=profile_observer)
|
||||||
self.text_output.emit("All profiles were successfully disabled")
|
self.text_output.emit("All profiles were successfully disabled")
|
||||||
except SudoScript as e:
|
except SudoScript as e:
|
||||||
self.text_output.emit(e)
|
self.text_output.emit(str(e))
|
||||||
except FirewallError as e:
|
except FirewallError as e:
|
||||||
self.text_output.emit(e)
|
self.text_output.emit(str(e))
|
||||||
except MissingPreReqs as e:
|
except MissingPreReqs as e:
|
||||||
self.text_output.emit(e)
|
self.text_output.emit(str(e))
|
||||||
except Exception:
|
except Exception:
|
||||||
self.text_output.emit("An error occurred when disabling profile")
|
self.text_output.emit("An error occurred when disabling profile")
|
||||||
finally:
|
finally:
|
||||||
|
|
@ -237,10 +237,12 @@ class WorkerThread(QThread):
|
||||||
else:
|
else:
|
||||||
self.text_output.emit(
|
self.text_output.emit(
|
||||||
f"No profile found with ID: {self.profile_data['id']}")
|
f"No profile found with ID: {self.profile_data['id']}")
|
||||||
# except SudoScript as e:
|
except SudoScript as e:
|
||||||
# self.text_output.emit(str(e))
|
self.text_output.emit(str(e))
|
||||||
# except MissingPreReqs as e:
|
except FirewallError as e:
|
||||||
# self.text_output.emit(str(e))
|
self.text_output.emit(str(e))
|
||||||
|
except MissingPreReqs as e:
|
||||||
|
self.text_output.emit(str(e))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.text_output.emit("An error occurred when disabling profile")
|
self.text_output.emit("An error occurred when disabling profile")
|
||||||
finally:
|
finally:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue