From aa74c8f85967e7f0b0c3dab9ec57494686e36f8f Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 3 Feb 2020 17:19:19 +0100 Subject: [PATCH] Display importerror tracebacks --- pyproject.toml | 2 +- royalnet/serf/serf.py | 4 +++- royalnet/version.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9d74607a..c139e4b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ [tool.poetry] name = "royalnet" - version = "5.3.4" + version = "5.4a2" description = "A multipurpose bot and web framework" authors = ["Stefano Pigozzi "] license = "AGPL-3.0+" diff --git a/royalnet/serf/serf.py b/royalnet/serf/serf.py index 8f8eb0c9..39c5c3d6 100644 --- a/royalnet/serf/serf.py +++ b/royalnet/serf/serf.py @@ -1,6 +1,7 @@ import logging import importlib import asyncio as aio +import sys from typing import * from sqlalchemy.schema import Table from royalnet.commands import * @@ -40,7 +41,8 @@ class Serf: try: packs[pack_name] = importlib.import_module(pack_name) except ImportError as e: - log.error(f"{e.__class__.__name__} during the import of {pack_name}: {e}") + log.error(f"{e.__class__.__name__} during the import of {pack_name}:\n" + f"{traceback.format_exception(*sys.exc_info())}") log.info(f"Packs: {len(packs)} imported") self.alchemy: Optional[ra.Alchemy] = None diff --git a/royalnet/version.py b/royalnet/version.py index 03217183..0cd5af67 100644 --- a/royalnet/version.py +++ b/royalnet/version.py @@ -1 +1 @@ -semantic = "5.4" +semantic = "5.4a2"