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
|
||||
self.worker_thread = WorkerThread(
|
||||
'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.start()
|
||||
|
||||
|
|
@ -1196,7 +1198,7 @@ class MenuPage(Page):
|
|||
self.popup.show()
|
||||
return
|
||||
|
||||
if profile_id < 0:
|
||||
if profile_id is not None and profile_id < 0:
|
||||
self.DisplayInstallScreen(text)
|
||||
return
|
||||
if is_enabled:
|
||||
|
|
|
|||
|
|
@ -136,11 +136,11 @@ class WorkerThread(QThread):
|
|||
profile, ignore=True, profile_observer=profile_observer)
|
||||
self.text_output.emit("All profiles were successfully disabled")
|
||||
except SudoScript as e:
|
||||
self.text_output.emit(e)
|
||||
self.text_output.emit(str(e))
|
||||
except FirewallError as e:
|
||||
self.text_output.emit(e)
|
||||
self.text_output.emit(str(e))
|
||||
except MissingPreReqs as e:
|
||||
self.text_output.emit(e)
|
||||
self.text_output.emit(str(e))
|
||||
except Exception:
|
||||
self.text_output.emit("An error occurred when disabling profile")
|
||||
finally:
|
||||
|
|
@ -237,10 +237,12 @@ class WorkerThread(QThread):
|
|||
else:
|
||||
self.text_output.emit(
|
||||
f"No profile found with ID: {self.profile_data['id']}")
|
||||
# except SudoScript as e:
|
||||
# self.text_output.emit(str(e))
|
||||
# except MissingPreReqs as e:
|
||||
# self.text_output.emit(str(e))
|
||||
except SudoScript as e:
|
||||
self.text_output.emit(str(e))
|
||||
except FirewallError as e:
|
||||
self.text_output.emit(str(e))
|
||||
except MissingPreReqs as e:
|
||||
self.text_output.emit(str(e))
|
||||
except Exception as e:
|
||||
self.text_output.emit("An error occurred when disabling profile")
|
||||
finally:
|
||||
|
|
|
|||
Loading…
Reference in a new issue