diff --git a/watcher/datasources/ceilometer.py b/watcher/datasources/ceilometer.py index 290c1d7ed..28e3eeee7 100644 --- a/watcher/datasources/ceilometer.py +++ b/watcher/datasources/ceilometer.py @@ -18,7 +18,6 @@ import datetime -from ceilometerclient import exc from oslo_log import log from oslo_utils import timeutils @@ -31,6 +30,13 @@ from watcher.datasources import base LOG = log.getLogger(__name__) +try: + from ceilometerclient import exc + HAS_CEILCLIENT = True +except ImportError: + HAS_CEILCLIENT = False + + class CeilometerHelper(base.DataSourceBase): NAME = 'ceilometer'