mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-25 01:20:32 +00:00
Fix for revoking already expired channel (drive)
This commit is contained in:
parent
e3a2bd348c
commit
dad251d02c
@ -56,6 +56,8 @@ import io
|
||||
import hashlib
|
||||
import threading
|
||||
|
||||
from googleapiclient.errors import HttpError
|
||||
|
||||
from tornado import version as tornadoVersion
|
||||
|
||||
try:
|
||||
@ -1309,7 +1311,10 @@ def watch_gdrive():
|
||||
def revoke_watch_gdrive():
|
||||
last_watch_response=config.config_google_drive_watch_changes_response
|
||||
if last_watch_response:
|
||||
response=gdriveutils.stopChannel(Gdrive.Instance().drive, last_watch_response['id'], last_watch_response['resourceId'])
|
||||
try:
|
||||
response=gdriveutils.stopChannel(Gdrive.Instance().drive, last_watch_response['id'], last_watch_response['resourceId'])
|
||||
except HttpError, e:
|
||||
pass
|
||||
settings = ub.session.query(ub.Settings).first()
|
||||
settings.config_google_drive_watch_changes_response=None
|
||||
ub.session.merge(settings)
|
||||
|
Loading…
Reference in New Issue
Block a user