chore: code check
This commit is contained in:
@@ -447,6 +447,10 @@ def register_ext_routes(app: FastAPI, ext: Extension) -> None:
|
|||||||
try:
|
try:
|
||||||
module = importlib.import_module(module_name)
|
module = importlib.import_module(module_name)
|
||||||
except Exception:
|
except Exception:
|
||||||
|
logger.warning(
|
||||||
|
f"Could not import module {module_name} for wasm extension "
|
||||||
|
f"{ext.code}."
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
register_wasm_ext_routes = getattr(
|
register_wasm_ext_routes = getattr(
|
||||||
module, "register_wasm_ext_routes", None
|
module, "register_wasm_ext_routes", None
|
||||||
|
|||||||
@@ -38,10 +38,10 @@ async def migrate_extension_database(
|
|||||||
await run_migration(ext_conn, ext_migrations, ext.id, current_version)
|
await run_migration(ext_conn, ext_migrations, ext.id, current_version)
|
||||||
|
|
||||||
|
|
||||||
def get_extension_type(ext_id: str, ext_dir: str | None = None) -> str | None:
|
def get_extension_type(ext_id: str, ext_dir: Path | None = None) -> str | None:
|
||||||
candidate_dirs = []
|
candidate_dirs = []
|
||||||
if ext_dir:
|
if ext_dir:
|
||||||
candidate_dirs.append(Path(ext_dir))
|
candidate_dirs.append(ext_dir)
|
||||||
candidate_dirs.extend(
|
candidate_dirs.extend(
|
||||||
[
|
[
|
||||||
Path(settings.lnbits_extensions_path, "extensions", ext_id),
|
Path(settings.lnbits_extensions_path, "extensions", ext_id),
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user