pcs/fix-serving-static-files.patch
2023-11-27 09:37:13 +08:00

34 lines
1.0 KiB
Diff

From 272009b4e3582f9b7a045c3f4ee867f9e943ee9e Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Mon, 27 Nov 2023 09:34:46 +0800
Subject: [PATCH] fix serving static files
---
pcs/daemon/app/ui.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pcs/daemon/app/ui.py b/pcs/daemon/app/ui.py
index cad6824..11440a0 100644
--- a/pcs/daemon/app/ui.py
+++ b/pcs/daemon/app/ui.py
@@ -67,14 +67,14 @@ class Logout(app_session.Mixin, AjaxMixin, BaseHandler):
class StaticFileMayBe(StaticFile):
# pylint: disable=abstract-method
- def get(self, *args, **kwargs):
+ async def get(self, *args, **kwargs):
# pylint: disable=signature-differs
# pylint: disable=invalid-overridden-method
if not os.path.isdir(str(self.root)):
# spa is probably not installed
self.set_status(404, "Not Found")
return None
- return super().get(*args, **kwargs)
+ return await super().get(*args, **kwargs)
def get_routes(
--
2.33.0