aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--radicale_infcloud/__init__.py9
-rwxr-xr-xsetup.py4
2 files changed, 6 insertions, 7 deletions
diff --git a/radicale_infcloud/__init__.py b/radicale_infcloud/__init__.py
index c65d03f..33815fc 100644
--- a/radicale_infcloud/__init__.py
+++ b/radicale_infcloud/__init__.py
@@ -18,8 +18,6 @@ from http import client
from radicale import httputils
from radicale.web import internal
-import pkg_resources
-
PLUGIN_CONFIG_SCHEMA = {"web": {
"infcloud_config": {
"value": "",
@@ -27,14 +25,15 @@ PLUGIN_CONFIG_SCHEMA = {"web": {
class Web(internal.Web):
+
def __init__(self, configuration):
super().__init__(configuration.copy(PLUGIN_CONFIG_SCHEMA))
- self.infcloud_folder = pkg_resources.resource_filename(__name__, "web")
def get(self, environ, base_prefix, path, user):
if path == "/.web/infcloud/" or path.startswith("/.web/infcloud"):
- status, headers, answer = httputils.serve_folder(
- self.infcloud_folder, base_prefix, path, "/.web/infcloud")
+ status, headers, answer = httputils.serve_resource(
+ "radicale_infcloud", "web", base_prefix, path,
+ "/.web/infcloud")
else:
status, headers, answer = super().get(
environ, base_prefix, path, user)
diff --git a/setup.py b/setup.py
index 9e1f51a..5826b31 100755
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ import os
from setuptools import setup
-VERSION = "3.1.1"
+VERSION = "3.1.6"
package_path = os.path.join(os.path.dirname(__file__), "radicale_infcloud")
web_data = sum((
@@ -23,4 +23,4 @@ setup(
platforms="Any",
packages=["radicale_infcloud"],
package_data={"radicale_infcloud": web_data},
- install_requires=["radicale>=3.1.1"])
+ install_requires=["radicale>=3.1.6"])
bgstack15