Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
captainwong
douban-api-proxy
Commits
ba106578
Commit
ba106578
authored
Jun 28, 2020
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add fix for read only gdrive file
parent
6315655f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
gdriveutils.py
cps/gdriveutils.py
+8
-2
No files found.
cps/gdriveutils.py
View file @
ba106578
...
...
@@ -27,6 +27,7 @@ from sqlalchemy import Column, UniqueConstraint
from
sqlalchemy
import
String
,
Integer
from
sqlalchemy.orm
import
sessionmaker
,
scoped_session
from
sqlalchemy.ext.declarative
import
declarative_base
from
sqlalchemy.exc
import
OperationalError
,
InvalidRequestError
try
:
from
pydrive.auth
import
GoogleAuth
...
...
@@ -479,8 +480,13 @@ def getChangeById (drive, change_id):
# Deletes the local hashes database to force search for new folder names
def
deleteDatabaseOnChange
():
session
.
query
(
GdriveId
)
.
delete
()
session
.
commit
()
try
:
session
.
query
(
GdriveId
)
.
delete
()
session
.
commit
()
except
(
OperationalError
,
InvalidRequestError
):
session
.
rollback
()
log
.
info
(
u"GDrive DB is not Writeable"
)
def
updateGdriveCalibreFromLocal
():
copyToDrive
(
Gdrive
.
Instance
()
.
drive
,
config
.
config_calibre_dir
,
False
,
True
)
...
...
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