mirror of
https://github.com/janeczku/calibre-web
synced 2024-12-26 01:50:31 +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 hashlib
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
|
from googleapiclient.errors import HttpError
|
||||||
|
|
||||||
from tornado import version as tornadoVersion
|
from tornado import version as tornadoVersion
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -1309,7 +1311,10 @@ def watch_gdrive():
|
|||||||
def revoke_watch_gdrive():
|
def revoke_watch_gdrive():
|
||||||
last_watch_response=config.config_google_drive_watch_changes_response
|
last_watch_response=config.config_google_drive_watch_changes_response
|
||||||
if last_watch_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 = ub.session.query(ub.Settings).first()
|
||||||
settings.config_google_drive_watch_changes_response=None
|
settings.config_google_drive_watch_changes_response=None
|
||||||
ub.session.merge(settings)
|
ub.session.merge(settings)
|
||||||
|
Loading…
Reference in New Issue
Block a user