Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
3bb94fd6
Commit
3bb94fd6
authored
Aug 05, 2010
by
Saul Ibarra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed exception handling when connecting with Google servers
parent
4a660992
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
contacts.py
blink/contacts.py
+4
-4
No files found.
blink/contacts.py
View file @
3bb94fd6
...
@@ -23,7 +23,7 @@ from application.python.util import Null
...
@@ -23,7 +23,7 @@ from application.python.util import Null
from
application.system
import
unlink
from
application.system
import
unlink
from
collections
import
deque
from
collections
import
deque
from
eventlet
import
api
from
eventlet
import
api
from
eventlet.green
import
urllib2
from
eventlet.green
import
httplib
,
urllib2
from
functools
import
partial
from
functools
import
partial
from
operator
import
attrgetter
from
operator
import
attrgetter
from
twisted.internet
import
reactor
from
twisted.internet
import
reactor
...
@@ -41,7 +41,7 @@ from blink.util import QSingleton, call_in_gui_thread, call_later, run_in_auxili
...
@@ -41,7 +41,7 @@ from blink.util import QSingleton, call_in_gui_thread, call_later, run_in_auxili
from
blink.widgets.buttons
import
SwitchViewButton
from
blink.widgets.buttons
import
SwitchViewButton
from
blink.widgets.labels
import
Status
from
blink.widgets.labels
import
Status
from
blink.google.gdata.client
import
BadAuthentication
,
CaptchaChallenge
,
RequestError
,
Unauthorized
from
blink.google.gdata.client
import
CaptchaChallenge
,
RequestError
,
Unauthorized
from
blink.google.gdata.contacts.client
import
ContactsClient
from
blink.google.gdata.contacts.client
import
ContactsClient
from
blink.google.gdata.contacts.data
import
ContactsFeed
from
blink.google.gdata.contacts.data
import
ContactsFeed
from
blink.google.gdata.contacts.service
import
ContactsQuery
from
blink.google.gdata.contacts.service
import
ContactsQuery
...
@@ -412,7 +412,7 @@ class GoogleContactsManager(object):
...
@@ -412,7 +412,7 @@ class GoogleContactsManager(object):
except
Unauthorized
:
except
Unauthorized
:
settings
.
google_contacts
.
authorization_token
=
AuthorizationToken
(
InvalidToken
)
settings
.
google_contacts
.
authorization_token
=
AuthorizationToken
(
InvalidToken
)
settings
.
save
()
settings
.
save
()
except
(
ConnectionLost
,
RequestError
,
socket
.
error
):
except
(
ConnectionLost
,
RequestError
,
httplib
.
HTTPException
,
socket
.
error
):
self
.
_load_timer
=
reactor
.
callLater
(
60
,
self
.
load_contacts
)
self
.
_load_timer
=
reactor
.
callLater
(
60
,
self
.
load_contacts
)
else
:
else
:
if
update_timestamp
:
if
update_timestamp
:
...
@@ -548,7 +548,7 @@ class GoogleContactsDialog(base_class, ui_class):
...
@@ -548,7 +548,7 @@ class GoogleContactsDialog(base_class, ui_class):
self
.
captcha_token
=
e
.
captcha_token
self
.
captcha_token
=
e
.
captcha_token
call_in_gui_thread
(
self
.
_set_captcha_image
,
captcha_data
)
call_in_gui_thread
(
self
.
_set_captcha_image
,
captcha_data
)
call_in_gui_thread
(
self
.
enable_captcha
,
True
)
call_in_gui_thread
(
self
.
enable_captcha
,
True
)
except
(
BadAuthentication
,
RequestError
)
:
except
RequestError
:
self
.
captcha_token
=
None
self
.
captcha_token
=
None
call_in_gui_thread
(
self
.
username_editor
.
setEnabled
,
True
)
call_in_gui_thread
(
self
.
username_editor
.
setEnabled
,
True
)
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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment