From 9cb3eb5685e5b74fb41c93196476085a73445838 Mon Sep 17 00:00:00 2001 From: Vitalii Date: Sun, 24 Apr 2022 19:39:10 +0300 Subject: [PATCH] Fixed entry to the program after registration --- ui/forms/auth_win.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ui/forms/auth_win.py b/ui/forms/auth_win.py index c05a27a..5c544e5 100644 --- a/ui/forms/auth_win.py +++ b/ui/forms/auth_win.py @@ -132,7 +132,7 @@ def sign_up(self): self.browser.save_cookies() self.account_name = self.browser.get_account_name() self.browser.quit() - self.return_auth_window('Successfully authorized') + self.return_auth_window('Successfully authorized', browser_closed=True) return True def sign_in(self, account_name): @@ -149,7 +149,7 @@ def sign_in(self, account_name): self.browser.quit() return True - def return_auth_window(self, error_message=None): + def return_auth_window(self, error_message=None, browser_closed=True): if error_message: try: self.parent_win.label_error.setMinimumSize( @@ -161,4 +161,5 @@ def return_auth_window(self, error_message=None): self.parent_win.setDisabled(False) except Exception: return - self.browser.quit() + if not browser_closed: + self.browser.quit()