Skip to content

exekall: Report import error in modules being imported

Douglas Raillard requested to merge github/fork/douglas-raillard-arm/_pr320 into master

Import errors need to be ignored when parsing the command line the first time, as some positional parameters could just belong to adaptor-specific options. During that phase, importing must be done with a best-effort policy, so that specifying a package name will result in importing as many submodules as possible. This avoids not finding the adaptor just because an unrelated module of the package failed to import with an ImportError.

Once the command line can be parsed unambiguously, modules can be imported again. The modules that were imported successfully are reused, but the one that failed to import will be imported again, and the exception will not be hidden at this point.

Merge request reports