Fix python lint errors

This commit is contained in:
c-bata committed 2022-03-20 02:09:53 +09:00
1 parent 0732086c6c
commit cae696181b
1 file changed
+1 -1
+1 -1
View File
@@ -257,7 +257,7 @@ def create_app(storage: BaseStorage) -> Bottle:
@app.get("/static/<filename:path>")
def send_static(filename: str) -> BottleViewReturn:
if "gzip" in request.headers["Accept-Encoding"]:
gz_filename = filename.strip('/\\') + ".gz"
gz_filename = filename.strip("/\\") + ".gz"
if os.path.exists(os.path.join(STATIC_DIR, gz_filename)):
filename = gz_filename
return static_file(filename, root=STATIC_DIR)