diff --git a/lizmap_server/context/__init__.py b/lizmap_server/context/__init__.py index 68be56b..38a3198 100644 --- a/lizmap_server/context/__init__.py +++ b/lizmap_server/context/__init__.py @@ -1,10 +1,11 @@ import sys from .common import ContextABC as ServerContext # noqa -from .common import model_dump_json, to_iso8601 # noqa +from .common import ProjectCacheError, model_dump_json, to_iso8601 # noqa from ..logger import Logger + def create_server_context() -> ServerContext: """ Create the appropriate server context """ diff --git a/lizmap_server/context/py_qgis_server2.py b/lizmap_server/context/py_qgis_server2.py index ba88519..c417e97 100644 --- a/lizmap_server/context/py_qgis_server2.py +++ b/lizmap_server/context/py_qgis_server2.py @@ -3,6 +3,7 @@ from typing import Dict, Iterator, List, Optional, Sequence, Tuple from py_qgis_contrib.core.qgis import QgisPluginService +from py_qgis_contrib.core import logger from py_qgis_cache import CacheEntry, CacheManager, ProjectMetadata from py_qgis_cache import CheckoutStatus as Co @@ -16,6 +17,7 @@ to_iso8601, ) + SERVER_CONTEXT_NAME = 'py-qgis-server2' @@ -84,9 +86,10 @@ def installed_plugins( service = QgisPluginService.get_service() for plugin in service.plugins: - md = plugin.metadata + md = plugin.metadata['general'] + logger.trace("== PLUGIN METADATA(%s): %s", plugin.name, md) yield ( - plugin, + plugin.path.name, {k: (md.get(k) or md.get(k.lower(), unknown_default)) for k in keys}, )