Use importlib to check for elasticsearch instead of import statement

Review Request #9099 - Created July 24, 2017 and submitted

Barret Rennie
Review Board
release-3.0.x
d1dd8ee...
reviewboard

The import elasticsearch statement in elasticsearch.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.

David Trowbridge
Christian Hammond
Barret Rennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (b33922b)
Loading...