Commit f34dc167 authored by Dan Pascu's avatar Dan Pascu

Do not create an unnecessary instance

parent 441c136f
...@@ -1335,9 +1335,8 @@ class GoogleContactsDialog(base_class, ui_class): ...@@ -1335,9 +1335,8 @@ class GoogleContactsDialog(base_class, ui_class):
username = self.username_editor.text() username = self.username_editor.text()
password = self.password_editor.text() password = self.password_editor.text()
client = ContactsClient() client = ContactsClient()
application = QApplication.instance()
try: try:
client.client_login(email=username, password=password, source=application.applicationName(), captcha_token=self.captcha_token, captcha_response=captcha_response) client.client_login(email=username, password=password, source=QApplication.applicationName(), captcha_token=self.captcha_token, captcha_response=captcha_response)
except CaptchaChallenge, e: except CaptchaChallenge, e:
call_in_gui_thread(self.username_editor.setEnabled, False) call_in_gui_thread(self.username_editor.setEnabled, False)
call_in_gui_thread(setattr, self.status_label, 'value', Status('Error authenticating with Google', color=red)) call_in_gui_thread(setattr, self.status_label, 'value', Status('Error authenticating with Google', color=red))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment