Removed f-strings, making it compatible with python 3.5

This commit is contained in:
Ozzieisaacs 2021-02-15 14:17:05 +01:00
parent 095a51edd0
commit 4aa1a838ed

View File

@ -156,7 +156,7 @@ class WebServer(object):
os.name == "nt"
and __main__.__package__ == ""
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".
py_script = os.path.abspath(py_script)
@ -164,7 +164,7 @@ class WebServer(object):
if os.name == "nt":
# Windows entry points have ".exe" extension and should be
# 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"
if (
@ -185,7 +185,7 @@ class WebServer(object):
name = os.path.splitext(os.path.basename(py_script))[0]
if name != "__main__":
py_module += f".{name}"
py_module += ".{}".format(name)
else:
# Incorrectly rewritten by pydevd debugger from "-m script" to "script".
py_module = py_script