Use importlib to check for elasticsearch instead of import statement
Review Request #9099 — Created July 24, 2017 and submitted — Latest diff uploaded
The
import elasticsearch
statement inelasticsearch.py
was
succeeding if the module was not installed because it would find
./elasticsearch.py
(itself) and import that instead. We now use
import_module
to do the dependency check, which checks for
system-level modules and not local ones.
With this patch applied, I cannot enable
elasticsearch
when it is not
installed.