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
0aa33d88
Commit
0aa33d88
authored
Feb 20, 2021
by
Ozzie Isaacs
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into development
parents
e64a504b
bc876a15
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
db.py
cps/db.py
+2
-0
server.py
cps/server.py
+6
-6
No files found.
cps/db.py
View file @
0aa33d88
...
@@ -624,6 +624,8 @@ class CalibreDB():
...
@@ -624,6 +624,8 @@ class CalibreDB():
.
join
(
*
join
,
isouter
=
True
)
\
.
join
(
*
join
,
isouter
=
True
)
\
.
filter
(
db_filter
)
\
.
filter
(
db_filter
)
\
.
filter
(
self
.
common_filters
(
allow_show_archived
))
.
filter
(
self
.
common_filters
(
allow_show_archived
))
entries
=
list
()
pagination
=
list
()
try
:
try
:
pagination
=
Pagination
(
page
,
pagesize
,
pagination
=
Pagination
(
page
,
pagesize
,
len
(
query
.
all
()))
len
(
query
.
all
()))
...
...
cps/server.py
View file @
0aa33d88
...
@@ -153,10 +153,10 @@ class WebServer(object):
...
@@ -153,10 +153,10 @@ class WebServer(object):
# not exist if a setuptools script is installed as an egg. It may be
# not exist if a setuptools script is installed as an egg. It may be
# set incorrectly for entry points created with pip on Windows.
# set incorrectly for entry points created with pip on Windows.
if
getattr
(
__main__
,
"__package__"
,
None
)
is
None
or
(
if
getattr
(
__main__
,
"__package__"
,
None
)
is
None
or
(
os
.
name
==
"nt"
os
.
name
==
"nt"
and
__main__
.
__package__
==
""
and
__main__
.
__package__
==
""
and
not
os
.
path
.
exists
(
py_script
)
and
not
os
.
path
.
exists
(
py_script
)
and
os
.
path
.
exists
(
f
"{py_script}.exe"
)
and
os
.
path
.
exists
(
"{}.exe"
.
format
(
py_script
)
)
):
):
# Executed a file, like "python app.py".
# Executed a file, like "python app.py".
py_script
=
os
.
path
.
abspath
(
py_script
)
py_script
=
os
.
path
.
abspath
(
py_script
)
...
@@ -164,7 +164,7 @@ class WebServer(object):
...
@@ -164,7 +164,7 @@ class WebServer(object):
if
os
.
name
==
"nt"
:
if
os
.
name
==
"nt"
:
# Windows entry points have ".exe" extension and should be
# Windows entry points have ".exe" extension and should be
# called directly.
# called directly.
if
not
os
.
path
.
exists
(
py_script
)
and
os
.
path
.
exists
(
f
"{py_script}.exe"
):
if
not
os
.
path
.
exists
(
py_script
)
and
os
.
path
.
exists
(
"{}.exe"
.
format
(
py_script
)
):
py_script
+=
".exe"
py_script
+=
".exe"
if
(
if
(
...
@@ -185,7 +185,7 @@ class WebServer(object):
...
@@ -185,7 +185,7 @@ class WebServer(object):
name
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
py_script
))[
0
]
name
=
os
.
path
.
splitext
(
os
.
path
.
basename
(
py_script
))[
0
]
if
name
!=
"__main__"
:
if
name
!=
"__main__"
:
py_module
+=
f
".{name}"
py_module
+=
".{}"
.
format
(
name
)
else
:
else
:
# Incorrectly rewritten by pydevd debugger from "-m script" to "script".
# Incorrectly rewritten by pydevd debugger from "-m script" to "script".
py_module
=
py_script
py_module
=
py_script
...
...
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