Skip to content
This repository was archived by the owner on May 29, 2020. It is now read-only.
This repository was archived by the owner on May 29, 2020. It is now read-only.

Printing module import errors #1

@codetorex

Description

@codetorex

base.py has

def map_pluggable_classes(config):
    pluggable_classes = dict()

    for m in config.get("modules"):
        try:
            exec("import %s" % m)
            classes = inspect.getmembers(sys.modules[m], inspect.isclass)

            for c in classes:
                if not issubclass(c[1], Pluggable):
                    continue

                pluggable_classes[c[0]] = c[1]
        except ImportError:
            warnings.warn("'%s' does not appear to be a valid module. Skipping!" % m)

If there is error occurs during a plugin import, they are not shown. Which makes it harder to look for a solution. It would be cool if it can inform user what is the problem with import. Thanks 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions