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

Printing module import errors #1

Open
codetorex opened this issue Sep 15, 2017 · 0 comments
Open

Printing module import errors #1

codetorex opened this issue Sep 15, 2017 · 0 comments

Comments

@codetorex
Copy link

codetorex commented Sep 15, 2017

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 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant