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
4aa1a838
Commit
4aa1a838
authored
Feb 15, 2021
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed f-strings, making it compatible with python 3.5
parent
095a51ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
server.py
cps/server.py
+3
-3
No files found.
cps/server.py
View file @
4aa1a838
...
@@ -156,7 +156,7 @@ class WebServer(object):
...
@@ -156,7 +156,7 @@ class WebServer(object):
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