diff --git a/awx/lib/awx_display_callback/cleanup.py b/awx/lib/awx_display_callback/cleanup.py index 8926e54f72..497401feea 100644 --- a/awx/lib/awx_display_callback/cleanup.py +++ b/awx/lib/awx_display_callback/cleanup.py @@ -24,7 +24,12 @@ import os import pwd # PSUtil -import psutil +try: + import psutil +except ImportError: + raise ImportError('psutil is missing; {}bin/pip install psutil'.format( + os.environ['VIRTUAL_ENV'] + )) __all__ = [] diff --git a/awx/lib/awx_display_callback/events.py b/awx/lib/awx_display_callback/events.py index ca801925f5..d22b93b8e4 100644 --- a/awx/lib/awx_display_callback/events.py +++ b/awx/lib/awx_display_callback/events.py @@ -27,7 +27,13 @@ import os import stat import threading import uuid -import memcache + +try: + import memcache +except ImportError: + raise ImportError('python-memcached is missing; {}bin/pip install python-memcached'.format( + os.environ['VIRTUAL_ENV'] + )) from six.moves import xrange