Skip to content

Commit

Permalink
fix: swap exec to exec_ (#234)
Browse files Browse the repository at this point in the history
Signed-off-by: Morgan Epp <60796713+epmog@users.noreply.github.com>
  • Loading branch information
epmog committed Mar 24, 2024
1 parent 7e418ab commit b3853c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/deadline/client/ui/dialogs/deadline_config_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def configure_settings(parent=None) -> bool:
Returns True if any changes were applied, False otherwise.
"""
deadline_config = DeadlineConfigDialog(parent=parent)
deadline_config.exec()
deadline_config.exec_()
return deadline_config.changes_were_applied

def __init__(self, parent=None) -> None:
Expand Down
6 changes: 3 additions & 3 deletions src/deadline/client/ui/dialogs/deadline_login_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def login(
close_on_success=close_on_success,
config=config,
)
return deadline_login.exec()
return deadline_login.exec_()

def __init__(
self,
Expand Down Expand Up @@ -173,9 +173,9 @@ def on_button_clicked(self, button):
while self.__login_thread.is_alive():
QApplication.instance().processEvents() # type: ignore[union-attr]

def exec(self) -> bool:
def exec_(self) -> bool:
"""
Runs the modal login dialog, returning True if the login was
successful, False otherwise.
"""
return super().exec() == QMessageBox.Ok
return super().exec_() == QMessageBox.Ok
6 changes: 3 additions & 3 deletions src/deadline/client/ui/dialogs/submit_job_progress_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def start_submission(
self._auto_accept = auto_accept

self._start_submission()
return self.exec()
return self.exec_()

def _build_ui(self):
"""Builds up the Dialog UI"""
Expand Down Expand Up @@ -613,12 +613,12 @@ def _shutdown_threads(self) -> None:
while thread.is_alive():
QApplication.instance().processEvents() # type: ignore[union-attr]

def exec(self) -> Optional[Dict[str, Any]]: # type: ignore[override]
def exec_(self) -> Optional[Dict[str, Any]]: # type: ignore[override]
"""
Runs the modal job progress dialog, returns the response from calling
create job if the dialog was accepted. Otherwise returns None
"""
if super().exec() == QDialog.Accepted:
if super().exec_() == QDialog.Accepted:
return self._create_job_response
return None

Expand Down

0 comments on commit b3853c2

Please sign in to comment.